代替。
我在
Github
网站上提出了相同的问题。链接在下面提供
https://github.com/springdoc/springdoc-openapi/issues/742#issue-642810354
得到了其中一位贡献者的答复
You use you own version of swagger-ui, so you can add your custom Logic, without having to rely on springdoc-openapi-ui.
springdoc:
swagger-ui:
url: "/v3/api-docs"
disable-swagger-default-url: true
或您可以使用主题插件:
springdoc:
swagger-ui:
disable-swagger-default-url: true
urls:
- url: "/v3/api-docs"
name: "myService"
我在与状态代码404的 /swagger-ui /index.html时有同样的问题。 我的问题是我使用的自定义配置扩展了WebMvcconFigurationSupport:
/swagger-ui/index.html
因此,我必须这样更新该配置,并且可以正常工作! :)
/v3/api-docs
我为此找到了解决方案的帖子。扫描并修改索引。
@Configuration
class CustomConfig() : WebMvcConfigurationSupport() {...}