在配置nacos实现聚合swagger时由于/v3/api-docs引起的网关路由找不到具体服务器的api-docs文档,导致swagger生成文档失败
运行环境
springfox-boot-starter:3.0.0
spring-boot-starter-parent:2.3.2.RELEASE
spring-cloud-dependencies:Hoxton.SR9
spring-cloud-alibaba-dependencies:2.2.6.RELEASE
1、此处是由于swagger官方的3.0.0版本的bug引起的
导致在application.yaml中补全找不到
解决方法:可以直接在application.yaml配置后,网关路由正常
springfox:
documentation:
open-api:
v3:
path: /${spring.application.name}/v3/api-docs
源码地址(swagger已从项目移除了,换成smart-doc + Torna 来生成文档了):https://gitee.com/dragonSaberCaptain/wisdom-parent.git