0

这不是 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 示例我已经知道 petstore 禁用(springdoc.swagger-ui.disable-swagger-default-url=true),但它不起作用

另一个问题是如果我在这里请求 http://localhost:8080/swagger-ui/index.html?url=/v3/api-docs

无法读取控制器信息 无法读取控制器信息

你应该总是在输入框中写 /v3/api-docs

/v3/api-docs 在输入框中

如果您请求 swagger.html,我希望 /v3/api-docs 的内容像第二张图片一样出现

我怎么解决这个问题?

感谢阅读祝你有美好的一天

4

0 回答 0