knife4j是为Java MVC框架集成Swagger生成Api文档的增强解决方案
knife4j项目地址:https://gitee.com/xiaoym/knife4j
1. 首先配置Swagger
Swagger配置:
2. 添加依赖
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>1.9.6</version>
</dependency>
3. 查看结果
最后是doc.html
http://192.168.7.6:8080/music-partner-api/doc.html