标签:model src 启动 type artifact 技术 opera stp imp
1 pom 文件加包依赖
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.2.2</version>
</dependency>
<!-- swagger-ui -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.2.2</version>
</dependency>
2 启动类加上注解@EnableSwagger
启动该注解使得用在controller中的swagger注解生效,覆盖的范围下的所有controller
3 Controller 配置:
说明:
4 启动项目,进入APi 列表:http://localhost:8085/swagger-ui.html
常用参数:
http://www.cnblogs.com/mao2080/p/9021714.html
标签:model src 启动 type artifact 技术 opera stp imp
原文地址:https://www.cnblogs.com/floratinny/p/10838468.html