1

https://www.dariawan.com/tutorials/spring/documenting-spring-boot-rest-api-springdoc-openapi-3/

据此,使用springdoc openapi依赖项应该拉入swagger3

我在用

        <dependency>
        <groupId>org.springdoc</groupId>
        <artifactId>springdoc-openapi-ui</artifactId>
        <version>1.2.15</version>
    </dependency>
    <dependency>
        <groupId>org.springdoc</groupId>
        <artifactId>springdoc-openapi-webmvc-core</artifactId>
        <version>1.2.15</version>
    </dependency>

swaggerui 页面查找以 404 结尾的 swagger-resources

MyErrorController.handleError:30 - ErrorController {timestamp=Wed Dec 11 13:56:37 CST 2019, status=404, error=Not Found, message=No message available, path=/swagger-resources}

我在依赖项中看到了这些

 +- org.springdoc:springdoc-openapi-ui:jar:1.2.15:compile
 |  +- org.webjars:swagger-ui:jar:3.24.0:compile
 |  \- org.webjars:webjars-locator:jar:0.37:compile
 |     \- org.webjars:webjars-locator-core:jar:0.41:compile
 |        +- io.github.classgraph:classgraph:jar:4.8.44:compile
 |        \- org.webjars.npm:angular__http:jar:2.4.10:compile
 +- org.springdoc:springdoc-openapi-webmvc-core:jar:1.2.15:compile
 |  \- org.springdoc:springdoc-openapi-common:jar:1.2.15:compile
 |     +- io.swagger.core.v3:swagger-models:jar:2.1.0:compile
 |     +- io.swagger.core.v3:swagger-annotations:jar:2.1.0:compile
 |     \- io.swagger.core.v3:swagger-integration:jar:2.1.0:compile
 |        \- io.swagger.core.v3:swagger-core:jar:2.1.0:compile
 |           \- javax.validation:validation-api:jar:2.0.1.Final:compile
4

0 回答 0