Swagger访问路径:http://localhost:8001/swagger-ui.html
Swagger 是一个规范和完整的框架,用于生成、描述、调用和可视化 RESTful 风格的 Web 服务。
1.生成在线接口文档
2.方便接口测试
配置Swagger2
1、创建common模块
在guli-parent下创建模块common
配置:
groupId:com.atguigu
artifactId:common
![](https://i-blog.csdnimg.cn/blog_migrate/1f00d6941e5c166ac3c526c4451b12f7.png)
2、在common中引入相关依赖
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>provided </scope>