Swagger 配置

pom配置
<!-- swagger2 -->
<dependency>
          <groupId>io.springfox</groupId>
          <artifactId>springfox-swagger2</artifactId>
          <version>2.8.0</version>
      </dependency>
      <dependency>
          <groupId>io.springfox</groupId>
          <artifactId>springfox-swagger-ui</artifactId>
          <version>2.8.0</version>
      </dependency>

 注解参数

@Api(description = "任务规则", value = "任务规则管理")
@ApiOperation(value = "新增任务规则", notes = "新增任务规则")
@RequestMapping(path = "/insert", method = RequestMethod.POST)
@Authorization //需注册
原文地址:https://www.cnblogs.com/panchangde/p/12036477.html