spring boot 整合swagger
github地址:https://github.com/xiaoping1988/ping-spring-boot
maven引入如下starter
<dependency>
<groupId>com.github.xiaoping1988.spring.boot</groupId>
<artifactId>swagger-ping-spring-boot-starter</artifactId>
<version>1.0.1</version>
</dependency>
yml配置:
swagger.enable: 开启或者关闭swagger,默认为true开启
一般在生产环境关闭swagger
集成之后,就可使用swagger注解来配置接口文档,文档查看地址:http://localhost:8080/swagger-ui.html
具体可参考sample项目中的pring-spring-boot-sample-mybatis