Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道一些关于如何保护我的应用程序免受外部 API 更改的模板或模式,例如,在 MS Azure 或任何其他公司的 API 内部。最好的方法是什么,并最大限度地减少我的代码更改?
您需要在程序中创建自己的 API。使用接口划分外部 API 消耗,因此如果外部 API 发生变化,您可以只编辑实现,因为接口契约会将程序的其余部分保存在一起。