我无法在 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
Run Code Online (Sandbox Code Playgroud)
我输入此 URL 来访问该界面:http://localhost:8080/swagger-ui.html
问题是它没有显示从以下位置加载的 api-docs:
“http://localhost:8080/v3/api-docs/swagger-config”
状态:200。
但如果我在网址字段中输入此内容,它就会起作用..我的目标不是每次都输入此内容..
我测试了所有可能的东西..我不明白为什么它不起作用
编辑:招摇配置
{"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":""}
Run Code Online (Sandbox Code Playgroud)