我无法在 Swagger-UI 中显示我的 Spring 文档。
以下是我的配置:
springdoc:
# api-docs:
# enabled: true
# path: /v3/api-docs/swagger-config
swagger-ui:
# path: /swagger-ui.html
disable-swagger-default-url: true
# config-url: /v3/api-docs/swagger-config
# url: /v3/api-docs
我输入以下URL以访问界面:http://localhost:8080/swagger-ui.html
问题在于它没有显示从以下地址加载的api-docs:
"http://localhost:8080/v3/api-docs/swagger-config"
状态码:200。
但如果我在URL字段中输入此内容,则可以正常工作。我的目标不是每次都要输入这个。
我尝试了所有可能的方法,但我不明白为什么它不起作用。
编辑:swagger-config
{"configUrl":"/v3/api-docs/swagger-config","oauth2RedirectUrl":"http://localhost:8080/swagger-ui/oauth2-redirect.html","url":"/v3/api-docs","validatorUrl":""}{"configUrl":"/v3/api-docs/swagger-config","oauth2RedirectUrl":"http://localhost:8080/swagger-ui/oauth2-redirect.html","url":"/v3/api-docs","validatorUrl":""}