这不是关于springfox的故事,而是springdoc -openapi的故事。
我现在的依赖
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.3</version>
</dependency>我的财产
springdoc.swagger-ui.path=/swagger-ui.html
springdoc.packagesToScan=com.example
springdoc.pathsToMatch=/api/**
springdoc.cache.disabled= true
springdoc.swagger-ui.disable-swagger-default-url=true在这里的请求(localhost:8080/ swagger -ui.html),我的服务器响应swagger示例,我已经知道petstore禁用了(springdoc.swagger-ui.disable-swagger-default-url=true),,但是它不能工作。
另一个问题是如果我在这里请求http://localhost:8080/swagger-ui/index.html?url=/v3/api-docs
无法读取控制器信息不能读取控制器信息
应该始终在输入框中写入/v3/api-docs。
如果您请求swagger.html,我希望/v3/api-docs的内容像第二张图片一样显示出来。
我该如何解决这个问题?
谢谢你的阅读祝你今天愉快
发布于 2022-04-27 17:14:54
尝试将springdoc-openapi-ui依赖项升级到1.6.8版本
https://stackoverflow.com/questions/70860223
复制相似问题