Swagger UI基本介绍
Swagger UI为我们的Develop或者说第其他客户提供了一个UI界面,通过该UI界面,我们可以对我们的系统进行基本的API测试和调式。同时通过该UI我们也可以知道当前系统暴露出来的所有API接口. 具体界面如下
SpringBoot项目中集成Swagger UI代码
- 引入相关包(以maven为例)
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency