springboot整合openApi
springboot 整合 openApi
·
使用openApi 可以不用添加任何配置
只需要添加如下依赖 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
然后在启动类上添加 @EnableOpenApi 即可
然后浏览器访问地址 Swagger UI 即可(localhost:8080/swagger-ui/index.html)
可能启动报错 在配置文件中 加入
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
更多推荐
所有评论(0)