Swagger2在SpringBoot中的集成指南

引入依赖Swagger2及Swagger2 UI

1
2
3
4
5
6
7
8
9
10
11
12
<!-- swagger -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
<!-- swagger-ui -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>

构建配置文件(基于JavaConfig)

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×