spring boot引入OpenAPI 3用于生成api文档
在父项目的pom.xml里添加如下依赖:
<dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> <version>1.6.4</version> </dependency>
@Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/swagger-ui/**", "/v3/api-docs/**"); }
访问http://localhost:8088/swagger-ui/index.html
参考资料:
https://www.baeldung.com/spring-rest-openapi-documentation
https://serveanswer.com/questions/java-spring-boot-with-swagger-failed-to-load-remote-configuration