[英]Centralize Swagger at one place for All microservices
我有 10 個微服務,每個都有多個 REST API。 現在我已經為每個微服務獨立配置了 swagger。 問題是我們有 10 個不同的 swagger url,每個微服務有 1 個。
我們還有 eureka 服務器和 zuul 網關。
My question is how can I centralize swagger url at one place ie I have only 1 swagger url for all the microservices.Whats the best approach and how can i do it?
我正在使用 spring 引導。
這可以通過使用自定義代理規則來完成,該規則將指向來自通用 URL 的單個 swagger 頁面。
http://<APP_URL>/swagger/<SERVICE_A> ->http://<APP_A_IP>:/api/swagger-ui/index.html http://<APP_URL>/swagger/<SERVICE_B> -> http: //<APP_B_IP>:/api/swagger-ui/index.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.