swagger的作用
- 生成在线接口文档
- 方便接口测试
创建公共模块,整合swagger,使所有模块都能使用
-
在guli-parent下创建common模块(maven工程)
-
在common中引入相关依赖
<!--swagger--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <scope>provided </scope> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId>