配置springdoc_springdoc-openapi-starter-webmvc-api-CSDN博客
注意注意注意,存在bug,在运行其他微服务的时候自行在接口前面拼接前缀
0: 依赖 springboot3之后,jakarta包代替javax,并且gateway使用webflux代替webmvc
//原始版本<!----><!--org.springdoc--><!--springdoc-openapi-starter-webflux-ui-->2.3.0<!---->//增强版com.github.xiaoyminknife4j-openapi3-webflux-jakarta-spring-boot-starter4.5.0
1: yml
springdoc:swagger-ui:urls:- name: gatewayurl: /v3/api-docs- name: xxxurl: /v3/api-docs/xxx
2: gateway
routes:- id: openapiuri: http://localhost:${server.port}predicates:- Path=/v3/api-docs/**filters:- RewritePath=/v3/api-docs/(?.*), /$\{path}/v3/api-docs
3:config
4:打开
原Swagger文档: http://localhost:0000/swagger-ui.html
knife4j文档: http://localhost:0000/doc.html