04 Swagger
添加依赖
<!-- 自动生成描述 API 的 json 文件 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<!-- 将 json 文件解析出来,用一种更友好的方式呈现 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>配置参数
swagger:
title: API标题
description: API描述
version: 1.0.0
terms-of-service-url: https://chanshiyu.com/
base-package: com.chanshiyu
contact:
name: Chanshiyu
url: https://chanshiyu.com/
email: me@chanshiyu.com配置类
使用
最后更新于