springboot整合swagger
加入依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.7.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.7.0</version> </dependency>
启动类加注解
@EnableSwagger2
3、在controller上加注解
@Api(value = "product",tags = {"用户操作接口"}) 方法上加 @ApiOperation(value = "查询所有")