You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weather/swagger3/SpringBoot整合Swagger3生成接口文档 ...

147 lines
113 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<!-- saved from url=(0038)https://zhuanlan.zhihu.com/p/161947638 -->
<html lang="zh" data-hairline="true" data-theme="light" data-react-helmet="data-theme" style=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>SpringBoot整合Swagger3生成接口文档 - 知乎</title><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta name="renderer" content="webkit"><meta name="force-rendering" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="google-site-verification" content="FTeR0c8arOPKh8c5DYh_9uu98_zJbaWw53J-Sch9MTg"><meta data-react-helmet="true" name="keywords" content="Swagger,前后端分离,软件接口"><meta data-react-helmet="true" name="description" content="前后端分离的项目接口文档的存在十分重要。与手动编写接口文档不同swagger是一个自动生成接口文档的工具在需求不断变更的环境下手动编写文档的效率实在太低。与swagger2相比新版的swagger3配置更少使用…"><meta data-react-helmet="true" property="og:title" content="SpringBoot整合Swagger3生成接口文档"><meta data-react-helmet="true" property="og:url" content="https://zhuanlan.zhihu.com/p/161947638"><meta data-react-helmet="true" property="og:description" content="前后端分离的项目接口文档的存在十分重要。与手动编写接口文档不同swagger是一个自动生成接口文档的工具在需求不断变更的环境下手动编写文档的效率实在太低。与swagger2相比新版的swagger3配置更少使用…"><meta data-react-helmet="true" property="og:image" content="https://pic4.zhimg.com/v2-c7e04b00af3237756dac849b8213ee6d_720w.jpg?source=172ae18b"><meta data-react-helmet="true" property="og:type" content="article"><meta data-react-helmet="true" property="og:site_name" content="知乎专栏"><link data-react-helmet="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-152.a53ae37b.png"><link data-react-helmet="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-152.a53ae37b.png" sizes="152x152"><link data-react-helmet="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-120.bbce8f18.png" sizes="120x120"><link data-react-helmet="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-76.cbade8f9.png" sizes="76x76"><link data-react-helmet="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-60.8f6c52aa.png" sizes="60x60"><link crossorigin="" rel="shortcut icon" type="image/x-icon" href="https://static.zhihu.com/heifetz/favicon.ico"><link crossorigin="" rel="search" type="application/opensearchdescription+xml" href="https://static.zhihu.com/heifetz/search.xml" title="知乎"><link rel="dns-prefetch" href="https://static.zhimg.com/"><link rel="dns-prefetch" href="https://pic1.zhimg.com/"><link rel="dns-prefetch" href="https://pic2.zhimg.com/"><link rel="dns-prefetch" href="https://pic3.zhimg.com/"><link rel="dns-prefetch" href="https://pic4.zhimg.com/"><style>
.u-safeAreaInset-top {
height: constant(safe-area-inset-top) !important;
height: env(safe-area-inset-top) !important;
}
.u-safeAreaInset-bottom {
height: constant(safe-area-inset-bottom) !important;
height: env(safe-area-inset-bottom) !important;
}
</style><link href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.app.216a26f4.0e6b2f0ed841f5b3d751.css" crossorigin="" rel="stylesheet"><script defer="" crossorigin="anonymous" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/init.js" data-sentry-config="{&quot;dsn&quot;:&quot;https://2d8d764432cc4f6fb3bc78ab9528299d@crash2.zhihu.com/1224&quot;,&quot;sampleRate&quot;:0.1,&quot;release&quot;:&quot;2230-ac2013d2&quot;,&quot;ignoreErrorNames&quot;:[&quot;NetworkError&quot;,&quot;SecurityError&quot;],&quot;ignoreErrors&quot;:[&quot;origin message&quot;,&quot;Network request failed&quot;,&quot;无法 fetch&quot;,&quot;这个系统不支持该功能。&quot;,&quot;Can&#39;t find variable: webkit&quot;,&quot;Can&#39;t find variable: $&quot;,&quot;内存不足&quot;,&quot;out of memory&quot;,&quot;DOM Exception 18&quot;,&quot;The operation is insecure&quot;,&quot;[object Event]&quot;,&quot;[object FileError]&quot;,&quot;[object DOMError]&quot;,&quot;[object Object]&quot;,&quot;拒绝访问。&quot;,&quot;Maximum call stack size exceeded&quot;,&quot;缺少 JavaScript 对象&quot;,&quot;componentWillEnter&quot;,&quot;componentWillLeave&quot;,&quot;componentWillAppear&quot;,&quot;getInlineStyleAt&quot;,&quot;getCharacterList&quot;,&quot;draft-js&quot;,&quot;UploadError&quot;,{},{},{},&quot;Non-Error exception captured&quot;],&quot;whitelistUrls&quot;:[&quot;static.zhihu.com&quot;]}"></script><style data-emotion-css="1cd9gw4">.css-1cd9gw4{margin-left:.3em;}</style><style data-emotion-css="qbubgm">.css-qbubgm{margin-left:0;}</style><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.zswsdid.12908df265f9866a0ae6.js" crossorigin="anonymous"></script><link rel="stylesheet" type="text/css" href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.user-hover-card.216a26f4.f19b464299cd4889eeb6.css" crossorigin="anonymous"><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.user-hover-card.b6d93e063dcf3ba6b80a.js" crossorigin="anonymous"></script><link rel="stylesheet" type="text/css" href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.Labels.216a26f4.7d19d2afdc588e36471f.css" crossorigin="anonymous"><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.Labels.b0d8f29f758d69618b0f.js" crossorigin="anonymous"></script><link rel="stylesheet" type="text/css" href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.GoodsRecommendGoodsCardList.216a26f4.fa8ead9ef18009727ea4.css" crossorigin="anonymous"><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.GoodsRecommendGoodsCardList.a3153a44a3e3e2e0c7aa.js" crossorigin="anonymous"></script><link rel="stylesheet" type="text/css" href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.modals.216a26f4.37f34e5eadb9da06be9d.css" crossorigin="anonymous"><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.modals.c4da0eb29cd568402080.js" crossorigin="anonymous"></script><link rel="stylesheet" type="text/css" href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.comments-modals.216a26f4.953f6e8064d7f947f0da.css" crossorigin="anonymous"><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.comments-modals.85cdd6e27cb828157e15.js" crossorigin="anonymous"></script><style data-emotion="css"></style><link rel="stylesheet" type="text/css" href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.signflow.216a26f4.bd7f666221e7000b679c.css" crossorigin="anonymous"><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.signflow.eb4f90e71b6b6764028d.js" crossorigin="anonymous"></script><link rel="stylesheet" type="text/css" href="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.richinput.216a26f4.5995aa589198d37c53ce.css" crossorigin="anonymous"><script charset="utf-8" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.richinput.d6faaa6b2c991a81efdd.js" crossorigin="anonymous"></script></head><body class="WhiteBg-body Body--isAppleDevice" data-react-helmet="class"><img hidden="" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/logo.804f083e.png"><div id="root"><div class="App"><div class="LoadingBar"></div><main role="main" class="App-main"><div class="Post-content" data-zop-usertoken="{&quot;userToken&quot;:&quot;&quot;}" data-zop="{&quot;authorName&quot;:&quot;程序员糖糖&quot;,&quot;itemId&quot;:161947638,&quot;title&quot;:&quot;SpringBoot整合Swagger3生成接口文档&quot;,&quot;type&quot;:&quot;article&quot;}" data-za-detail-view-path-module="PostItem" data-za-extra-module="{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Post&quot;,&quot;token&quot;:&quot;161947638&quot;}}}"><div class="ColumnPageHeader-Wrapper"><div><div class="Sticky ColumnPageHeader" style=""><div class="ColumnPageHeader-content"><a href="https://www.zhihu.com/" aria-label="知乎"><svg viewBox="0 0 64 30" fill="#0066FF" width="64" height="30"><path d="M29.05 4.582H16.733V25.94h3.018l.403 2.572 4.081-2.572h4.815V4.582zm-5.207 18.69l-2.396 1.509-.235-1.508h-1.724V7.233h6.78v16.04h-2.425zM14.46 14.191H9.982c0-.471.033-.954.039-1.458v-5.5h5.106V5.935a1.352 1.352 0 0 0-.404-.957 1.378 1.378 0 0 0-.968-.396H5.783c.028-.088.056-.177.084-.255.274-.82 1.153-3.326 1.153-3.326a4.262 4.262 0 0 0-2.413.698c-.57.4-.912.682-1.371 1.946-.532 1.453-.997 2.856-1.31 3.693C1.444 8.674.28 11.025.28 11.025a5.85 5.85 0 0 0 2.52-.61c1.119-.593 1.679-1.502 2.054-2.883l.09-.3h2.334v5.5c0 .5-.045.982-.073 1.46h-4.12c-.71 0-1.39.278-1.893.775a2.638 2.638 0 0 0-.783 1.874h6.527a17.717 17.717 0 0 1-.778 3.649 16.796 16.796 0 0 1-3.012 5.273A33.104 33.104 0 0 1 0 28.74s3.13 1.175 5.425-.954c1.388-1.292 2.631-3.814 3.23-5.727a28.09 28.09 0 0 0 1.12-5.229h5.967v-1.37a1.254 1.254 0 0 0-.373-.899 1.279 1.279 0 0 0-.909-.37z"></path><path d="M11.27 19.675l-2.312 1.491 5.038 7.458a6.905 6.905 0 0 0 .672-2.218 3.15 3.15 0 0 0-.28-2.168l-3.118-4.563zM51.449 15.195V5.842c4.181-.205 7.988-.405 9.438-.483l.851-.05c.387-.399.885-2.395.689-3.021-.073-.25-.213-.666-.638-.555a33.279 33.279 0 0 1-4.277.727c-2.766.321-3.97.404-7.804.682-6.718.487-12.709.72-12.709.72a2.518 2.518 0 0 0 .788 1.834 2.567 2.567 0 0 0 1.883.706c2.278-.095 5.598-.25 8.996-.41v9.203h-12.78c0 .703.281 1.377.783 1.874a2.69 2.69 0 0 0 1.892.777h10.105v7.075c0 .887-.464 1.192-1.231 1.214h-3.92a4.15 4.15 0 0 0 .837 1.544 4.2 4.2 0 0 0 1.403 1.067 6.215 6.215 0 0 0 2.71.277c1.36-.066 2.967-.826 2.967-3.57v-7.607h11.28c.342 0 .67-.135.91-.374.242-.239.378-.563.378-.902v-1.375H51.449z"></path><path d="M42.614 8.873a2.304 2.304 0 0 0-1.508-.926 2.334 2.334 0 0 0-1.727.405l-.376.272 4.255 5.85 2.24-1.62-2.884-3.98zM57.35 8.68l-3.125 4.097 2.24 1.663 4.517-5.927-.375-.277a2.32 2.32 0 0 0-1.722-.452 2.327 2.327 0 0 0-1.536.896z"></path></svg></a><div class="ColumnPageHeader-Button"><button type="button" class="Button ColumnPageHeader-WriteButton Button--blue"><svg class="Zi Zi--EditSurround" fill="currentColor" viewBox="0 0 24 24" width="24" height="24"><path d="M4 6a2 2 0 0 1 2-2h5.75a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-5.5a.25.25 0 0 0-.25.25v11.5c0 .138.112.25.25.25h11.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6z" fill-rule="evenodd" clip-rule="evenodd"></path><path d="M18.293 1.293a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-10 10A1 1 0 0 1 12 16H9a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707l10-10zm-8.22 11.048a.25.25 0 0 0-.073.177v1.232c0 .138.112.25.25.25h1.232a.25.25 0 0 0 .177-.073l8.75-8.75a.25.25 0 0 0 0-.354l-1.232-1.232a.25.25 0 0 0-.354 0l-8.75 8.75z" fill-rule="evenodd" clip-rule="evenodd"></path></svg>写文章</button></div></div></div></div></div><img class="TitleImage" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-c7e04b00af3237756dac849b8213ee6d_1440w.jpg" alt="SpringBoot整合Swagger3生成接口文档"><article class="Post-Main Post-NormalMain" tabindex="-1"><header class="Post-Header"><h1 class="Post-Title">SpringBoot整合Swagger3生成接口文档</h1><div class="Post-Author"><div class="AuthorInfo" itemprop="author" itemscope="" itemtype="http://schema.org/Person"><meta itemprop="name" content="程序员糖糖"><meta itemprop="image" content="https://pic2.zhimg.com/v2-b668d2996a589f3a949b19b15d877d8d_l.jpg?source=172ae18b"><meta itemprop="url" content="https://www.zhihu.com/people/cheng-xu-yuan-tian-xing"><meta itemprop="zhihu:followerCount"><span class="UserLink AuthorInfo-avatarWrapper"><div class="Popover"><div id="Popover7-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover7-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/cheng-xu-yuan-tian-xing"><img class="Avatar Avatar--round AuthorInfo-avatar" width="38" height="38" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-b668d2996a589f3a949b19b15d877d8d_xs.jpg" srcset="https://pic2.zhimg.com/v2-b668d2996a589f3a949b19b15d877d8d_l.jpg?source=172ae18b 2x" alt="程序员糖糖"></a></div></div></span><div class="AuthorInfo-content"><div class="AuthorInfo-head"><span class="UserLink AuthorInfo-name"><div class="Popover"><div id="Popover8-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover8-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/cheng-xu-yuan-tian-xing">程序员糖糖</a></div></div></span></div><div class="AuthorInfo-detail"><div class="AuthorInfo-badge"><div class="ztext AuthorInfo-badgeText">希望和广大的网友交流讨论学习设计有想学习java可以联系我</div></div></div></div></div></div><div class="LabelContainer-wrapper"><div class="LabelContainer css-1vobhm4-Labels"><div><div class="css-7bx0rn-Label" style="cursor: pointer;"><div class="css-edj92p"><div class="css-140fcia">创作声明:内容包含虚构创作 </div></div><svg class="Zi Zi--ArrowDown css-zzd7cz-Label" fill="rgba(23, 81, 153, 0.72)" viewBox="0 0 24 24" width="26" height="26"><path d="M12 13L8.285 9.218a.758.758 0 0 0-1.064 0 .738.738 0 0 0 0 1.052l4.249 4.512a.758.758 0 0 0 1.064 0l4.246-4.512a.738.738 0 0 0 0-1.052.757.757 0 0 0-1.063 0L12.002 13z" fill-rule="evenodd"></path></svg></div></div></div></div><div><span class="Voters"><button type="button" class="Button Button--plain">15 人<!-- -->赞同了该文章</button></span></div></header><div class="Post-RichTextContainer"><div class="RichText ztext Post-RichText"><p>前后端分离的项目接口文档的存在十分重要。与手动编写接口文档不同swagger是一个自动生成接口文档的工具在需求不断变更的环境下手动编写文档的效率实在太低。与swagger2相比新版的swagger3配置更少使用更加方便。</p><h2>一、pom文件中引入Swagger3依赖</h2><div class="highlight"><pre><code class="language-text">&lt;dependency&gt;
&lt;groupId&gt;io.springfox&lt;/groupId&gt;
&lt;artifactId&gt;springfox-boot-starter&lt;/artifactId&gt;
&lt;version&gt;3.0.0&lt;/version&gt;
&lt;/dependency&gt;
</code></pre></div><h2>二、Application上面加入@EnableOpenApi注解</h2><div class="highlight"><pre><code class="language-text">@EnableOpenApi
@SpringBootApplication
@MapperScan(basePackages = {"cn.ruiyeclub.dao"})
public class Swagger3Application {
public static void main(String[] args) {
SpringApplication.run(Swagger3Application.class, args);
}
}
</code></pre></div><h2>三、Swagger3Config的配置</h2><div class="highlight"><pre><code class="language-text">@Configuration
public class Swagger3Config {
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.OAS_30)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Swagger3接口文档")
.description("更多请咨询服务开发者Ray。")
.contact(new Contact("Ray。", "http://www.ruiyeclub.cn", "ruiyeclub@foxmail.com"))
.version("1.0")
.build();
}
}
</code></pre></div><h2>四、Swagger注解的使用说明</h2><div class="highlight"><pre><code class="language-text">@Api用在请求的类上表示对类的说明
tags="说明该类的作用可以在UI界面上看到的注解"
value="该参数没什么意义在UI界面上也看到所以不需要配置"
@ApiOperation用在请求的方法上说明方法的用途、作用
value="说明方法的用途、作用"
notes="方法的备注说明"
@ApiImplicitParams用在请求的方法上表示一组参数说明
@ApiImplicitParam用在@ApiImplicitParams注解中指定一个请求参数的各个方面
name参数名
value参数的汉字说明、解释
required参数是否必须传
paramType参数放在哪个地方
· header --&gt; 请求参数的获取:@RequestHeader
· query --&gt; 请求参数的获取:@RequestParam
· path用于restful接口--&gt; 请求参数的获取:@PathVariable
· div不常用
· form不常用
dataType参数类型默认String其它值dataType="Integer"
defaultValue参数的默认值
@ApiResponses用在请求的方法上表示一组响应
@ApiResponse用在@ApiResponses中一般用于表达一个错误的响应信息
code数字例如400
message信息例如"请求参数没填好"
response抛出异常的类
@ApiModel用于响应类上表示一个返回响应数据的信息
这种一般用在post创建的时候使用@RequestBody这样的场景
请求参数无法使用@ApiImplicitParam注解进行描述的时候
@ApiModelProperty用在属性上描述响应类的属性
</code></pre></div><p>Controller层的配置</p><div class="highlight"><pre><code class="language-text">@Api(tags = "用户信息管理")
@RestController
@RequestMapping("userRecord")
public class UserRecordController extends ApiController {
/**
* 服务对象
*/
@Resource
private UserRecordService userRecordService;
/**
* 分页查询所有数据
* @param page 分页对象
* @param userRecord 查询实体
* @return 所有数据
*/
@ApiOperation("分页查询所有数据")
@GetMapping("page")
public R selectAll(Page&lt;UserRecord&gt; page, UserRecord userRecord) {
return success(this.userRecordService.page(page, new QueryWrapper&lt;&gt;(userRecord)));
}
/**
* 通过主键查询单条数据
* @param id 主键
* @return 单条数据
*/
@ApiOperation("通过主键查询单条数据")
@GetMapping("{id}")
public R selectOne(@PathVariable Serializable id) {
return success(this.userRecordService.getById(id));
}
/**
* 新增数据
* @param userRecord 实体对象
* @return 新增结果
*/
@ApiOperation("新增数据")
@PostMapping("insert")
public R insert(@RequestBody UserRecord userRecord) {
return success(this.userRecordService.save(userRecord));
}
/**
* 修改数据
* @param userRecord 实体对象
* @return 修改结果
*/
@ApiOperation("修改数据")
@PutMapping("update")
public R update(@RequestBody UserRecord userRecord) {
return success(this.userRecordService.updateById(userRecord));
}
/**
* 删除数据
* @param idList 主键结合
* @return 删除结果
*/
@ApiOperation("删除数据")
@DeleteMapping("delete")
public R delete(@RequestParam("idList") List&lt;Long&gt; idList) {
return success(this.userRecordService.removeByIds(idList));
}
}
View Code</code></pre></div><p>五、Swagger界面效果</p><p class="ztext-empty-paragraph"><br></p><figure data-size="normal"><noscript><img src="https://pic3.zhimg.com/v2-8fac9dc146b0af4deaebf14e5d68148e_b.jpg" data-caption="" data-size="normal" data-rawwidth="550" data-rawheight="299" class="origin_image zh-lightbox-thumb" width="550" data-original="https://pic3.zhimg.com/v2-8fac9dc146b0af4deaebf14e5d68148e_r.jpg"/></noscript><img src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-8fac9dc146b0af4deaebf14e5d68148e_720w.jpg" data-caption="" data-size="normal" data-rawwidth="550" data-rawheight="299" class="origin_image zh-lightbox-thumb lazy" width="550" data-original="https://pic3.zhimg.com/v2-8fac9dc146b0af4deaebf14e5d68148e_r.jpg" data-actualsrc="https://pic3.zhimg.com/v2-8fac9dc146b0af4deaebf14e5d68148e_b.jpg" data-lazy-status="ok"></figure><p class="ztext-empty-paragraph"><br></p><p>Swagger的访问路径由port/swagger-ui.html改成了 port/swagger-ui/ 或port/swagger-ui/index.html ,项目演示代码在 springboot-swagger</p><p class="ztext-empty-paragraph"><br></p><a target="_blank" href="https://link.zhihu.com/?target=https%3A//shimo.im/docs/ILL3EcF2XlkwUMoO/" data-draft-node="block" data-draft-type="link-card" data-image="https://pic4.zhimg.com/v2-2193dee59de82a8eeaa77f9ed0c65a63_180x120.jpg" data-image-width="960" data-image-height="600" class="LinkCard old LinkCard--hasImage" data-za-detail-view-id="172"><span class="LinkCard-backdrop" style="background-image:url(https://pic4.zhimg.com/v2-2193dee59de82a8eeaa77f9ed0c65a63_180x120.jpg)"></span><span class="LinkCard-content"><span class="LinkCard-text"><span class="LinkCard-title" data-text="true">Java进阶架构设计、并发编程等核心知识、电子书、视频、面试题等免费获取</span><span class="LinkCard-meta"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--InsertLink" fill="currentColor" viewBox="0 0 24 24" width="17" height="17"><path d="M13.414 4.222a4.5 4.5 0 1 1 6.364 6.364l-3.005 3.005a.5.5 0 0 1-.707 0l-.707-.707a.5.5 0 0 1 0-.707l3.005-3.005a2.5 2.5 0 1 0-3.536-3.536l-3.005 3.005a.5.5 0 0 1-.707 0l-.707-.707a.5.5 0 0 1 0-.707l3.005-3.005zm-6.187 6.187a.5.5 0 0 1 .638-.058l.07.058.706.707a.5.5 0 0 1 .058.638l-.058.07-3.005 3.004a2.5 2.5 0 0 0 3.405 3.658l.13-.122 3.006-3.005a.5.5 0 0 1 .638-.058l.069.058.707.707a.5.5 0 0 1 .058.638l-.058.069-3.005 3.005a4.5 4.5 0 0 1-6.524-6.196l.16-.168 3.005-3.005zm8.132-3.182a.25.25 0 0 1 .353 0l1.061 1.06a.25.25 0 0 1 0 .354l-8.132 8.132a.25.25 0 0 1-.353 0l-1.061-1.06a.25.25 0 0 1 0-.354l8.132-8.132z"></path></svg></span>shimo.im</span></span><span class="LinkCard-imageCell"><img class="LinkCard-image LinkCard-image--horizontal" alt="图标" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-2193dee59de82a8eeaa77f9ed0c65a63_180x120.jpg"></span></span></a><p><b><i>点击领取学习资料</i></b></p></div></div><div class="ContentItem-time">发布于 2020-07-20</div><div class="Post-topicsAndReviewer"><div class="TopicList Post-Topics"><div class="Tag Topic" data-za-detail-view-path-module="TopicItem" data-za-extra-module="{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Topic&quot;,&quot;token&quot;:&quot;20080742&quot;}}}"><span class="Tag-content"><a class="TopicLink" href="https://www.zhihu.com/topic/20080742" target="_blank"><div class="Popover"><div id="Popover1-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover1-content">Swagger</div></div></a></span></div><div class="Tag Topic" data-za-detail-view-path-module="TopicItem" data-za-extra-module="{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Topic&quot;,&quot;token&quot;:&quot;20043499&quot;}}}"><span class="Tag-content"><a class="TopicLink" href="https://www.zhihu.com/topic/20043499" target="_blank"><div class="Popover"><div id="Popover2-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover2-content">前后端分离</div></div></a></span></div><div class="Tag Topic" data-za-detail-view-path-module="TopicItem" data-za-extra-module="{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Topic&quot;,&quot;token&quot;:&quot;20001370&quot;}}}"><span class="Tag-content"><a class="TopicLink" href="https://www.zhihu.com/topic/20001370" target="_blank"><div class="Popover"><div id="Popover3-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover3-content">软件接口</div></div></a></span></div></div></div><div><div class="Sticky RichContent-actions is-fixed is-bottom" style="width: 690px; bottom: 0px; left: 438.5px;"><div class="ContentItem-actions" data-za-detail-view-path-module="BottomBar" data-za-extra-module="{&quot;card&quot;:{&quot;content&quot;:{&quot;type&quot;:&quot;Post&quot;,&quot;id&quot;:&quot;161947638&quot;}}}"><span><button aria-label="赞同 15 " type="button" class="Button VoteButton VoteButton--up"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--TriangleUp VoteButton-TriangleUp" fill="currentColor" viewBox="0 0 24 24" width="10" height="10"><path d="M2 18.242c0-.326.088-.532.237-.896l7.98-13.203C10.572 3.57 11.086 3 12 3c.915 0 1.429.571 1.784 1.143l7.98 13.203c.15.364.236.57.236.896 0 1.386-.875 1.9-1.955 1.9H3.955c-1.08 0-1.955-.517-1.955-1.9z" fill-rule="evenodd"></path></svg></span>赞同 15</button><button aria-label="反对" type="button" class="Button VoteButton VoteButton--down"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--TriangleDown" fill="currentColor" viewBox="0 0 24 24" width="10" height="10"><path d="M20.044 3H3.956C2.876 3 2 3.517 2 4.9c0 .326.087.533.236.896L10.216 19c.355.571.87 1.143 1.784 1.143s1.429-.572 1.784-1.143l7.98-13.204c.149-.363.236-.57.236-.896 0-1.386-.876-1.9-1.956-1.9z" fill-rule="evenodd"></path></svg></span></button></span><div class="css-qbubgm"><button type="button" class="Button BottomActions-CommentBtn Button--plain Button--withIcon Button--withLabel"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--Comment Button-zi" fill="currentColor" viewBox="0 0 24 24" width="1.2em" height="1.2em"><path d="M10.241 19.313a.97.97 0 0 0-.77.2 7.908 7.908 0 0 1-3.772 1.482.409.409 0 0 1-.38-.637 5.825 5.825 0 0 0 1.11-2.237.605.605 0 0 0-.227-.59A7.935 7.935 0 0 1 3 11.25C3 6.7 7.03 3 12 3s9 3.7 9 8.25-4.373 9.108-10.759 8.063z" fill-rule="evenodd"></path></svg></span>9 条评论</button></div><div class="Popover ShareMenu"><div class="ShareMenu-toggler" id="Popover4-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover4-content"><img class="ShareMenu-fakeQRCode" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/qrcode" alt="微信二维码"><button type="button" class="Button Button--plain Button--withIcon Button--withLabel"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--Share Button-zi" fill="currentColor" viewBox="0 0 24 24" width="1.2em" height="1.2em"><path d="M2.931 7.89c-1.067.24-1.275 1.669-.318 2.207l5.277 2.908 8.168-4.776c.25-.127.477.198.273.39L9.05 14.66l.927 5.953c.18 1.084 1.593 1.376 2.182.456l9.644-15.242c.584-.892-.212-2.029-1.234-1.796L2.93 7.89z" fill-rule="evenodd"></path></svg></span>分享</button></div></div><button type="button" class="Button ContentItem-action Button--plain Button--withIcon Button--withLabel"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--Heart Button-zi" fill="currentColor" viewBox="0 0 24 24" width="1.2em" height="1.2em"><path d="M2 8.437C2 5.505 4.294 3.094 7.207 3 9.243 3 11.092 4.19 12 6c.823-1.758 2.649-3 4.651-3C19.545 3 22 5.507 22 8.432 22 16.24 13.842 21 12 21 10.158 21 2 16.24 2 8.437z" fill-rule="evenodd"></path></svg></span>喜欢</button><button type="button" class="Button ContentItem-action Button--plain Button--withIcon Button--withLabel"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--Star Button-zi" fill="currentColor" viewBox="0 0 24 24" width="1.2em" height="1.2em"><path d="M5.515 19.64l.918-5.355-3.89-3.792c-.926-.902-.639-1.784.64-1.97L8.56 7.74l2.404-4.871c.572-1.16 1.5-1.16 2.072 0L15.44 7.74l5.377.782c1.28.186 1.566 1.068.64 1.97l-3.89 3.793.918 5.354c.219 1.274-.532 1.82-1.676 1.218L12 18.33l-4.808 2.528c-1.145.602-1.896.056-1.677-1.218z" fill-rule="evenodd"></path></svg></span>收藏</button><button type="button" class="Button ContentItem-action Button--plain Button--withIcon Button--withLabel"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--Deliver Button-zi" fill="currentColor" viewBox="0 0 24 24" width="1.2em" height="1.2em"><path d="M5.171 4H18.83a1.5 1.5 0 0 1 1.455 1.136l2.597 10.386a4 4 0 0 1 .119.97V19s0 2-2.002 2H3c-2 0-2-2-2-2v-2.508a4 4 0 0 1 .12-.97L3.715 5.136A1.5 1.5 0 0 1 5.171 4zm1.074 2a1 1 0 0 0-.97.761l-2.123 8.62a.5.5 0 0 0 .486.619h4.717a1 1 0 0 1 .892.548C9.906 17.85 10.824 18.5 12 18.5c1.176 0 2.094-.65 2.753-1.952a1 1 0 0 1 .892-.548h4.717a.5.5 0 0 0 .486-.62l-2.122-8.619A1 1 0 0 0 17.755 6H6.245zM8 9c0-.552.453-1 .997-1h6.006c.55 0 .997.444.997 1 0 .552-.453 1-.997 1H8.997A.996.996 0 0 1 8 9zm-1.5 4c0-.552.445-1 .996-1h9.008c.55 0 .996.444.996 1 0 .552-.445 1-.996 1H7.496a.995.995 0 0 1-.996-1z"></path></svg></span>申请转载</button><div class="Post-ActionMenuButton"><div class="Popover"><div id="Popover5-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover5-content"><button type="button" class="Button Button--plain Button--withIcon Button--iconOnly"><span style="display:inline-flex;align-items:center"><svg class="Zi Zi--Dots Button-zi" fill="currentColor" viewBox="0 0 24 24" width="1.2em" height="1.2em"><path d="M5 14a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm7 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm7 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" fill-rule="evenodd"></path></svg></span></button></div></div></div></div></div><div class="Sticky--holder" style="position: static; inset: auto auto 0px 0px; display: block; float: none; margin: 0px 0px 10px; height: 54px;"></div></div></article><div class="Post-Sub Post-NormalSub"><div class="Recommendations-Main" style="width: 1567px;"><h3 class="BlockTitle Recommendations-BlockTitle">推荐阅读</h3><ul class="Recommendations-List"><button class="PagingButton PagingButton-Previous" disabled="" data-za-detail-view-path-module="Unknown" data-za-detail-view-path-module_name="推荐阅读" data-za-extra-module="{}"><svg class="Zi Zi--ArrowLeft" fill="#d3d3d3" viewBox="0 0 24 24" width="40" height="40"><path d="M14.782 16.78a.737.737 0 0 1-1.052 0L9.218 12.53a.758.758 0 0 1 0-1.063L13.73 7.22a.737.737 0 0 1 1.052 0c.29.294.29.77.001 1.063L11 12l3.782 3.716c.29.294.29.77 0 1.063z" fill-rule="evenodd"></path></svg></button><a href="https://zhuanlan.zhihu.com/p/258394497" class="PostItem"><div><img src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-00f68a25a030b5dc78fb6039850cf4a5_250x0.jpg" srcset="https://pic2.zhimg.com/v2-00f68a25a030b5dc78fb6039850cf4a5_qhd.jpg?source=172ae18b 2x" class="PostItem-TitleImage" alt="SpringBoot实战:集成Swagger"><h1 class="PostItem-Title">SpringBoot实战:集成Swagger</h1><div class="PostItem-Footer"><span>张晗</span><span class="PostItem-FooterTitle">发表于Sprin...</span></div></div></a><a href="https://zhuanlan.zhihu.com/p/183244422" class="PostItem"><div><img src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-94347854fb2cad43f70301732078f12c_250x0.jpg" srcset="https://pic2.zhimg.com/v2-94347854fb2cad43f70301732078f12c_qhd.jpg?source=172ae18b 2x" class="PostItem-TitleImage" alt="从零搭建后端框架对方不想说话但扔了个swagger2"><h1 class="PostItem-Title">从零搭建后端框架对方不想说话但扔了个swagger2</h1><div class="PostItem-Footer"><span>花少cal...</span><span class="PostItem-FooterTitle">发表于程序员课堂</span></div></div></a><a href="https://zhuanlan.zhihu.com/p/149781340" class="PostItem"><div><img src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-9b98d8ce20b0922636c646d7e4d831ee_250x0.jpg" srcset="https://pic2.zhimg.com/v2-9b98d8ce20b0922636c646d7e4d831ee_qhd.jpg?source=172ae18b 2x" class="PostItem-TitleImage" alt="Swagger2进阶集成统一认证和SpringSecurity的登录接口"><h1 class="PostItem-Title">Swagger2进阶集成统一认证和SpringSecurity的登录接口</h1><div class="PostItem-Footer"><span>读钓</span><span class="PostItem-FooterTitle">发表于读钓的YY</span></div></div></a><a href="https://zhuanlan.zhihu.com/p/89599492" class="PostItem"><div><h1 class="PostItem-Title">SpringBoot整合Swagger2</h1><p class="PostItem-Summary">作为一位Java码农,在web前后端分离项目开发中我认为写的最多的就是接口Api,大家各自约定好规则进行开发,前端只负责前端实现,后端负责提供数据接口,作为后端每当写完接口还得为前端小姐姐提…</p><div class="PostItem-Footer"><span>Java资料社区</span><span class="PostItem-FooterTitle"></span></div></div></a><button class="PagingButton PagingButton-Next" data-za-detail-view-path-module="Unknown" data-za-detail-view-path-module_name="推荐阅读" data-za-extra-module="{}"><svg class="Zi Zi--ArrowRight" fill="#d3d3d3" viewBox="0 0 24 24" width="40" height="40"><path d="M9.218 16.78a.737.737 0 0 0 1.052 0l4.512-4.249a.758.758 0 0 0 0-1.063L10.27 7.22a.737.737 0 0 0-1.052 0 .759.759 0 0 0-.001 1.063L13 12l-3.782 3.716a.758.758 0 0 0 0 1.063z" fill-rule="evenodd"></path></svg></button></ul></div><div class="Comments-container" data-za-detail-view-path-module="CommentList" data-za-extra-module="{}"><div class="CommentsV2 CommentsV2--withEditor CommentsV2-withPagination"><div class="Topbar CommentTopbar"><div class="Topbar-title"><h2 class="CommentTopbar-title">9 条评论</h2></div><div class="Topbar-options"><button type="button" class="Button Button--plain Button--withIcon Button--withLabel"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Switch Button-zi" fill="currentColor" viewBox="0 0 24 24" width="1.2em" height="1.2em"><path d="M13.004 7V4.232c0-.405.35-.733.781-.733.183 0 .36.06.501.17l6.437 5.033c.331.26.376.722.1 1.033a.803.803 0 0 1-.601.264H2.75a.75.75 0 0 1-.75-.75V7.75A.75.75 0 0 1 2.75 7h10.254zm-1.997 9.999v2.768c0 .405-.35.733-.782.733a.814.814 0 0 1-.5-.17l-6.437-5.034a.702.702 0 0 1-.1-1.032.803.803 0 0 1 .6-.264H21.25a.75.75 0 0 1 .75.75v1.499a.75.75 0 0 1-.75.75H11.007z" fill-rule="evenodd"></path></svg></span>切换为时间排序</button></div></div><div><div class="CommentsV2-footer CommentEditorV2--normal"><div class="CommentEditorV2-inputWrap"><div class="InputLike CommentEditorV2-input Editable"><div class="Dropzone Editable-content RichText RichText--editable RichText--clearBoth ztext" style="min-height: 198px;"><div class="DraftEditor-root"><div class="public-DraftEditorPlaceholder-root"><div class="public-DraftEditorPlaceholder-inner" id="placeholder-dbj05" style="white-space: pre-wrap;">写下你的评论...</div></div><div class="DraftEditor-editorContainer"><div aria-describedby="placeholder-dbj05" class="notranslate public-DraftEditor-content" contenteditable="true" role="textbox" spellcheck="true" tabindex="0" style="outline: none; user-select: text; white-space: pre-wrap; overflow-wrap: break-word;"><div data-contents="true"><div class="Editable-unstyled" data-block="true" data-editor="dbj05" data-offset-key="b0i7-0-0"><div data-offset-key="b0i7-0-0" class="public-DraftStyleDefault-block public-DraftStyleDefault-ltr"><span data-offset-key="b0i7-0-0"><br data-text="true"></span></div></div></div></div></div></div></div><input multiple="" type="file" accept="image/webp,image/jpg,image/jpeg,image/png,image/gif" style="display: none;"><div></div></div><div class="CommentEditorV2-inputUpload"><div class="CommentEditorV2-popoverWrap"><div class="Popover ImagePopover"><button aria-label="插入图片" data-tooltip="插入图片" data-tooltip-position="bottom" data-tooltip-will-hide-on-click="true" id="Popover10-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover10-content" type="button" class="Button Editable-control Button--plain"><svg class="Zi Zi--AddImage" fill="currentColor" viewBox="0 0 24 24" width="24" height="24"><path d="M13.25 5.5H6.868c-.755 0-1.368.613-1.368 1.368v10.264c0 .755.613 1.368 1.368 1.368h10.264c.755 0 1.368-.613 1.368-1.368V10.75H20v6.467A2.783 2.783 0 0 1 17.217 20H6.783A2.783 2.783 0 0 1 4 17.217V6.783A2.783 2.783 0 0 1 6.783 4h6.467v1.5zM8.158 13.4a1.033 1.033 0 0 1 1.744-.078l.258.37a.782.782 0 0 0 1.303-.031l1.332-2.113a1.173 1.173 0 0 1 2.01.043l2.03 3.537A1.25 1.25 0 0 1 15.748 17H8.25a1.252 1.252 0 0 1-1.085-1.873l.992-1.728zM9.5 11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3.75-5.5a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5zM18.5 4V2.25a.75.75 0 1 1 1.5 0V4h1.75a.75.75 0 1 1 0 1.5H20v1.75a.75.75 0 1 1-1.5 0V5.5h-1.75a.75.75 0 1 1 0-1.5h1.75zm.75 7.5a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5z"></path></svg><svg width="21" height="14" class="css-agjc5i" fill="none"><path fill="url(#A)" stroke="#f6f6f6" d="M7.486.504a6 6 0 100 12h7a6 6 0 100-12h-7z"></path><g fill="#935d14"><path d="M8.459 9.431l2.465-5.366h-.916L8.401 7.751l-1.6-3.687h-.923L8.35 9.431h.109zm3.825 0V4.065h-.814v5.366h.814zm2.05 0V7.445h.284c.659 0 1.156-.153 1.491-.46s.502-.747.502-1.321c0-.496-.154-.887-.462-1.172s-.794-.427-1.458-.427h-1.178v5.366h.822zm.305-2.708h-.305V4.78h.378c.388 0 .664.09.829.27s.247.414.247.701c0 .268-.085.496-.254.686s-.468.285-.894.285z" fill-rule="evenodd"></path><path d="M8.459 9.431v.146h.094l.039-.085-.133-.061zm2.465-5.366l.133.061.095-.207h-.228v.146zm-.916 0v-.146h-.096l-.038.088.134.058zM8.401 7.751l-.134.058.134.309.134-.309-.134-.058zm-1.6-3.687l.134-.058-.038-.088h-.096v.146zm-.923 0v-.146h-.229l.096.208.133-.061zM8.35 9.431l-.133.061.039.085h.094v-.146zm3.934 0v.146h.146v-.146h-.146zm0-5.366h.146v-.146h-.146v.146zm-.814 0v-.146h-.146v.146h.146zm0 5.366h-.146v.146h.146v-.146zm2.865 0v.146h.146v-.146h-.146zm0-1.986v-.146h-.146v.146h.146zm-.822-3.38v-.146h-.146v.146h.146zm0 5.366h-.146v.146h.146v-.146zm.822-2.708h-.146v.146h.146v-.146zm0-1.942v-.146h-.146v.146h.146zM8.592 9.492l2.465-5.366-.266-.122L8.326 9.37l.266.122zm2.332-5.573h-.916v.293h.916v-.293zm-1.05.088L8.267 7.693l.268.117 1.607-3.687-.268-.117zM8.535 7.693l-1.6-3.687-.269.116 1.6 3.687.268-.116zM6.801 3.918h-.923v.293h.923v-.293zm-1.056.208l2.472 5.366.266-.122-2.472-5.366-.266.122zM8.35 9.577h.109v-.293H8.35v.293zm4.08-.146V4.065h-.293v5.366h.293zm-.146-5.512h-.814v.293h.814v-.293zm-.961.146v5.366h.293V4.065h-.293zm.146 5.512h.814v-.293h-.814v.293zm3.011-.146V7.445h-.293v1.986h.293zm-.146-1.839h.284v-.293h-.284v.293zm.284 0c.68 0 1.218-.158 1.589-.498l-.198-.216c-.297.273-.753.421-1.392.421v.293zm1.589-.498c.372-.341.549-.826.549-1.429h-.293c0 .545-.158.942-.454 1.214l.198.216zm.549-1.429c0-.529-.166-.962-.509-1.279l-.199.215c.272.252.415.6.415 1.064h.293zm-.509-1.279c-.347-.321-.877-.466-1.557-.466v.293c.648 0 1.09.14 1.358.388l.199-.215zM14.69 3.92h-1.178v.293h1.178V3.92zm-1.324.146v5.366h.293V4.065h-.293zm.146 5.512h.822v-.293h-.822v.293zm1.127-3.001h-.305v.293h.305v-.293zm-.159.146V4.78h-.293v1.942h.293zm-.146-1.796h.378v-.293h-.378v.293zm.378 0c.37 0 .597.087.721.223l.216-.198c-.205-.224-.532-.318-.937-.318v.293zm.721.223c.136.148.209.345.209.602h.293c0-.317-.092-.588-.286-.8l-.216.198zm.209.602a.85.85 0 01-.217.589l.218.195a1.14 1.14 0 00.292-.784h-.293zm-.217.589c-.128.143-.373.236-.785.236v.293c.441 0 .792-.097 1.003-.334l-.218-.195z"></path></g><defs><lineargradient id="A" x1="1.986" x2="19.986" y1="12.004" y2="12.004" gradientUnits="userSpaceOnUse"><stop stop-color="#f8e2c4"></stop><stop offset="1" stop-color="#f3bb6c"></stop></lineargradient></defs></svg></button></div><label class="UploadPicture-wrapper"><input type="file" accept="image/png,image/jpeg" class="UploadPicture-input"></label><div class="Popover"><div id="Popover11-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover11-content" class="css-ltqpv7"></div></div><div class="Popover"><button aria-label="插入表情" data-tooltip="插入表情" data-tooltip-position="bottom" data-tooltip-will-hide-on-click="true" id="Popover12-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover12-content" type="button" class="Button Editable-control Button--plain"><svg class="Zi Zi--Emotion" fill="currentColor" viewBox="0 0 24 24" width="24" height="24"><path d="M7.523 13.5h8.954c-.228 2.47-2.145 4-4.477 4-2.332 0-4.25-1.53-4.477-4zM12 21a9 9 0 1 1 0-18 9 9 0 0 1 0 18zm0-1.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15zm-3-8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm6 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"></path></svg></button></div></div></div></div><button type="button" disabled="" class="Button CommentEditorV2-singleButton Button--primary Button--blue">发布</button></div></div><div><div class="CommentListV2"><ul class="NestComment"><li class="NestComment--rootCommentNoChild"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover13-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover13-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/li-xiao-hong-69-36"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-c4e83e72e4f017ecc59d96249de6f482_s.jpg" srcset="https://pic1.zhimg.com/v2-c4e83e72e4f017ecc59d96249de6f482_xs.jpg?source=06d4cd63 2x" alt="李小鸿"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/li-xiao-hong-69-36">李小鸿</a></span><span class="CommentItemV2-time">04-15</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>这。。。新的注解被吃了呀</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul><ul class="NestComment"><li class="NestComment--rootCommentNoChild"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover14-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover14-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/dong-guang-wen-3"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-ef47f27bbfa3ce2dd507a2ab40a3cd6e_s.jpg" srcset="https://pic1.zhimg.com/v2-ef47f27bbfa3ce2dd507a2ab40a3cd6e_xs.jpg?source=06d4cd63 2x" alt="东光问"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/dong-guang-wen-3">东光问</a></span><span class="CommentItemV2-time">03-27</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>请问,响应参数如果是泛型的话,比如 Result&lt;User&gt; ,响应参数说明时,如何一级一级的显示注释说明; 而不是去 Schemas 里找,谢谢</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul><ul class="NestComment"><li class="NestComment--rootCommentNoChild"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover15-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover15-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/univer_yu"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/6a49d1b5a5959ca90d11389cd7d25a00_s.jpg" srcset="https://pic4.zhimg.com/6a49d1b5a5959ca90d11389cd7d25a00_xs.jpg?source=06d4cd63 2x" alt="寰宇壹梦"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/univer_yu">寰宇壹梦</a></span><span class="CommentItemV2-time">02-22</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>如果一个接口又多个方法,或者一个方法有多个接收参数,如何排序?</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul><ul class="NestComment"><li class="NestComment--rootCommentNoChild"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover16-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover16-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/shen-jing-wang-luo-88"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-bc97dc3c2dbb8ef57370c95524d645c5_s.jpg" srcset="https://pic1.zhimg.com/v2-bc97dc3c2dbb8ef57370c95524d645c5_xs.jpg?source=06d4cd63 2x" alt="北漂猫"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/shen-jing-wang-luo-88">北漂猫</a></span><span class="CommentItemV2-time">2020-11-26</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>DocumentationType.OAS_30不存在</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul><ul class="NestComment"><li class="NestComment--rootComment"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover17-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover17-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/cheng-xu-yuan-ray"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-3d2fd6a9844adb5698f5cf57110413ae_s.jpg" srcset="https://pic1.zhimg.com/v2-3d2fd6a9844adb5698f5cf57110413ae_xs.jpg?source=06d4cd63 2x" alt="陈大帅哥Ray"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/cheng-xu-yuan-ray">陈大帅哥Ray</a></span><span class="CommentItemV2-time">2020-11-09</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>演示项目在 <a href="http://link.zhihu.com/?target=https%3A//github.com/ruiyeclub/SpringBoot-Hello" class=" wrap external" target="_blank" rel="nofollow noreferrer" data-za-detail-view-id="1043">ruiyeclub/SpringBoot-Hello</a></p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li><li class="NestComment--child"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover18-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover18-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/jiang-lin-wei-74"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/da8e974dc_s.jpg" srcset="https://pic2.zhimg.com/da8e974dc_xs.jpg?source=06d4cd63 2x" alt="江林伟"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/jiang-lin-wei-74">江林伟</a></span><span class="CommentItemV2-reply">回复</span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/cheng-xu-yuan-ray">陈大帅哥Ray</a></span><span class="CommentItemV2-time">2020-12-08</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>你这写的不行啊,swagger 就这样? 新增注解一个没用上 没有参考意义</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul><ul class="NestComment"><li class="NestComment--rootCommentNoChild"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover19-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover19-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/ChaoChaoGege"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-951e49d1dc0dd09dfbaa8f8a25f76edf_s.jpg" srcset="https://pic2.zhimg.com/v2-951e49d1dc0dd09dfbaa8f8a25f76edf_xs.jpg?source=06d4cd63 2x" alt="Baimy"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/ChaoChaoGege">Baimy</a></span><span class="CommentItemV2-time">2020-10-21</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>清楚,有用,哈哈哈</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul><ul class="NestComment"><li class="NestComment--rootCommentNoChild"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover20-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover20-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/man-man-yang-63"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/da8e974dc_s.jpg" srcset="https://pic2.zhimg.com/da8e974dc_xs.jpg?source=06d4cd63 2x" alt="慢慢羊"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/man-man-yang-63">慢慢羊</a></span><span class="CommentItemV2-time">2020-09-10</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>有和spring cloud gateway聚合的例子吗</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul><ul class="NestComment"><li class="NestComment--rootCommentNoChild"><div class="CommentItemV2"><div><div class="CommentItemV2-meta"><span class="UserLink CommentItemV2-avatar"><div class="Popover"><div id="Popover21-toggle" aria-haspopup="true" aria-expanded="false" aria-owns="Popover21-content"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/ukzz"><img class="Avatar UserLink-avatar" width="24" height="24" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/v2-438af19a8a177c175d197cae03c7d6c4_s.jpg" srcset="https://pic4.zhimg.com/v2-438af19a8a177c175d197cae03c7d6c4_xs.jpg?source=06d4cd63 2x" alt="implementsstudio"></a></div></div></span><span class="UserLink"><a class="UserLink-link" data-za-detail-view-element_name="User" target="_blank" href="https://www.zhihu.com/people/ukzz">implementsstudio</a></span><span class="CommentItemV2-time">2020-08-19</span></div><div class="CommentItemV2-metaSibling"><div class="CommentRichText CommentItemV2-content"><div class="RichText ztext"><p>yinrubule</p></div></div><div class="CommentItemV2-footer"><button type="button" class="Button CommentItemV2-likeBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Reply" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="margin-right: 5px;"><path d="M22.959 17.22c-1.686-3.552-5.128-8.062-11.636-8.65-.539-.053-1.376-.436-1.376-1.561V4.678c0-.521-.635-.915-1.116-.521L1.469 10.67a1.506 1.506 0 0 0-.1 2.08s6.99 6.818 7.443 7.114c.453.295 1.136.124 1.135-.501V17a1.525 1.525 0 0 1 1.532-1.466c1.186-.139 7.597-.077 10.33 2.396 0 0 .396.257.536.257.892 0 .614-.967.614-.967z" fill-rule="evenodd"></path></svg></span>回复</button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Like" fill="currentColor" viewBox="0 0 24 24" width="16" height="16" style="transform: rotate(180deg); margin-right: 5px;"><path d="M14.445 9h5.387s2.997.154 1.95 3.669c-.168.51-2.346 6.911-2.346 6.911s-.763 1.416-2.86 1.416H8.989c-1.498 0-2.005-.896-1.989-2v-7.998c0-.987.336-2.032 1.114-2.639 4.45-3.773 3.436-4.597 4.45-5.83.985-1.13 3.2-.5 3.037 2.362C15.201 7.397 14.445 9 14.445 9zM3 9h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="Button CommentItemV2-hoverBtn Button--plain"><span style="display: inline-flex; align-items: center;"><svg class="Zi Zi--Report" fill="currentColor" viewBox="0 0 24 24" width="14" height="14"><path d="M19.947 3.129c-.633.136-3.927.639-5.697.385-3.133-.45-4.776-2.54-9.949-.888-.997.413-1.277 1.038-1.277 2.019L3 20.808c0 .3.101.54.304.718a.97.97 0 0 0 .73.304c.275 0 .519-.102.73-.304.202-.179.304-.418.304-.718v-6.58c4.533-1.235 8.047.668 8.562.864 2.343.893 5.542.008 6.774-.657.397-.178.596-.474.596-.887V3.964c0-.599-.42-.972-1.053-.835z" fill-rule="evenodd"></path></svg></span> 举报</button></div></div></div></div></li></ul></div></div></div></div></div></div></main><div class="CornerButtons"><div class="CornerAnimayedFlex CornerAnimayedFlex--hidden"><button data-tooltip="回到顶部" data-tooltip-position="left" data-tooltip-will-hide-on-click="true" aria-label="回到顶部" type="button" class="Button CornerButton Button--plain"><svg class="Zi Zi--BackToTop" aria-label="回到顶部" fill="currentColor" viewBox="0 0 24 24" width="24" height="24"><path d="M16.036 19.59a1 1 0 0 1-.997.995H9.032a.996.996 0 0 1-.997-.996v-7.005H5.03c-1.1 0-1.36-.633-.578-1.416L11.33 4.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.005z"></path></svg></button></div></div></div></div><script id="js-clientConfig" type="text/json">{"host":"zhihu.com","protocol":"https:","wwwHost":"www.zhihu.com","videoHost":"video.zhihu.com","fetchRoot":{"www":"https:\u002F\u002Fwww.zhihu.com","api":"https:\u002F\u002Fapi.zhihu.com","lens":"https:\u002F\u002Flens.zhihu.com","zhuanlan":"https:\u002F\u002Fzhuanlan.zhihu.com","walletpay":"https:\u002F\u002Fwalletpay.zhihu.com","captcha":"https:\u002F\u002Fcaptcha.zhihu.com"}}</script><script id="js-initialData" type="text/json">{"initialState":{"common":{"ask":{}},"loading":{"global":{"count":0},"local":{"env\u002FgetIpinfo\u002F":false,"article\u002Fget\u002F":false,"brand\u002FgetUrl\u002F":false}},"club":{"tags":{},"admins":{"data":[]},"members":{"data":[]},"explore":{"candidateSyncClubs":{}},"profile":{},"checkin":{},"comments":{"paging":{},"loading":{},"meta":{},"ids":{}},"postList":{"paging":{},"loading":{},"ids":{}},"recommend":{"data":[]},"silences":{"data":[]},"application":{"profile":null}},"entities":{"users":{"cheng-xu-yuan-tian-xing":{"isFollowed":false,"avatarUrlTemplate":"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-b668d2996a589f3a949b19b15d877d8d.jpg?source=172ae18b","uid":"1249071239072387072","userType":"people","isFollowing":false,"urlToken":"cheng-xu-yuan-tian-xing","id":"13a026f64dfdeb40cce094fa300002d7","description":"Q裙1001357847,领取更多学习资料","name":"程序员糖糖","isAdvertiser":false,"headline":"希望和广大的网友交流讨论学习设计有想学习java可以联系我","gender":0,"url":"\u002Fpeople\u002F13a026f64dfdeb40cce094fa300002d7","avatarUrl":"https:\u002F\u002Fpic2.zhimg.com\u002Fv2-b668d2996a589f3a949b19b15d877d8d_l.jpg?source=172ae18b","isOrg":false,"type":"people","levelInfo":{"exp":5000,"level":3,"nicknameColor":{"color":"","nightModeColor":""},"levelIcon":"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-f6eeb35cfbc32ccd2905dbaeb024b69c_l.png","iconInfo":{"url":"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-f6eeb35cfbc32ccd2905dbaeb024b69c_l.png","nightModeUrl":"https:\u002F\u002Fpic2.zhimg.com\u002Fv2-ffc234a2038d00a67bd184a2deb14711_l.png","width":93,"height":51}},"badge":[],"badgeV2":{"title":"","mergedBadges":[],"detailBadges":[],"icon":"","nightIcon":""}}},"questions":{},"answers":{},"articles":{"161947638":{"trackUrl":["https:\u002F\u002Fsugar.zhihu.com\u002Fplutus_adreaper\u002Fcontent_monitor_log?si=__SESSIONID__&ti=__ATOKEN__&at=view&pf=__OS__&ed=BiBUKF0xBSkqGGJ-QhvjYHlDBQ==&idfa=__IDFA__&imei=__IMEI__&androidid=__ANDROIDID__&oaid=__OAID__&ci=__CREATIVEID__&zid=__ZONEID__"],"id":161947638,"title":"SpringBoot整合Swagger3生成接口文档","type":"article","articleType":"normal","excerptTitle":"","url":"https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F161947638","imageUrl":"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-c7e04b00af3237756dac849b8213ee6d_720w.jpg?source=172ae18b","titleImage":"https:\u002F\u002Fpic2.zhimg.com\u002Fv2-c7e04b00af3237756dac849b8213ee6d_720w.jpg?source=172ae18b","excerpt":"\u003Cimg src=\"https:\u002F\u002Fpic1.zhimg.com\u002Fv2-d785e00f27dfd86c7318268000688fe0_200x112.jpeg\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"550\" data-rawheight=\"299\" data-watermark=\"watermark\" data-original-src=\"v2-d785e00f27dfd86c7318268000688fe0\" data-watermark-src=\"v2-8fac9dc146b0af4deaebf14e5d68148e\" data-private-watermark-src=\"\" data-original=\"https:\u002F\u002Fpic1.zhimg.com\u002Fv2-d785e00f27dfd86c7318268000688fe0_r.jpeg\" class=\"origin_image inline-img zh-lightbox-thumb\"\u002F\u003E前后端分离的项目接口文档的存在十分重要。与手动编写接口文档不同swagger是一个自动生成接口文档的工具在需求不断变更的环境下手动编写文档的效率实在太低。与swagger2相比新版的swagger3配置更少使用更加方便。 一、pom文件中引入Swagger3依赖&lt;…","created":1595246578,"updated":1595246578,"author":{"isFollowed":false,"avatarUrlTemplate":"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-b668d2996a589f3a949b19b15d877d8d.jpg?source=172ae18b","uid":"1249071239072387072","userType":"people","isFollowing":false,"urlToken":"cheng-xu-yuan-tian-xing","id":"13a026f64dfdeb40cce094fa300002d7","description":"Q裙1001357847,领取更多学习资料","name":"程序员糖糖","isAdvertiser":false,"headline":"希望和广大的网友交流讨论学习设计有想学习java可以联系我","gender":0,"url":"\u002Fpeople\u002F13a026f64dfdeb40cce094fa300002d7","avatarUrl":"https:\u002F\u002Fpic2.zhimg.com\u002Fv2-b668d2996a589f3a949b19b15d877d8d_l.jpg?source=172ae18b","isOrg":false,"type":"people","levelInfo":{"exp":5000,"level":3,"nicknameColor":{"color":"","nightModeColor":""},"levelIcon":"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-f6eeb35cfbc32ccd2905dbaeb024b69c_l.png","iconInfo":{"url":"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-f6eeb35cfbc32ccd2905dbaeb024b69c_l.png","nightModeUrl":"https:\u002F\u002Fpic2.zhimg.com\u002Fv2-ffc234a2038d00a67bd184a2deb14711_l.png","width":93,"height":51}},"badge":[],"badgeV2":{"title":"","mergedBadges":[],"detailBadges":[],"icon":"","nightIcon":""}},"commentPermission":"all","copyrightPermission":"need_review","state":"published","imageWidth":700,"imageHeight":300,"content":"\u003Cp\u003E前后端分离的项目接口文档的存在十分重要。与手动编写接口文档不同swagger是一个自动生成接口文档的工具在需求不断变更的环境下手动编写文档的效率实在太低。与swagger2相比新版的swagger3配置更少使用更加方便。\u003C\u002Fp\u003E\u003Ch2\u003E一、pom文件中引入Swagger3依赖\u003C\u002Fh2\u003E\u003Cdiv class=\"highlight\"\u003E\u003Cpre\u003E\u003Ccode class=\"language-text\"\u003E&lt;dependency&gt;\n &lt;groupId&gt;io.springfox&lt;\u002FgroupId&gt;\n &lt;artifactId&gt;springfox-boot-starter&lt;\u002FartifactId&gt;\n &lt;version&gt;3.0.0&lt;\u002Fversion&gt;\n&lt;\u002Fdependency&gt;\n\u003C\u002Fcode\u003E\u003C\u002Fpre\u003E\u003C\u002Fdiv\u003E\u003Ch2\u003E二、Application上面加入@EnableOpenApi注解\u003C\u002Fh2\u003E\u003Cdiv class=\"highlight\"\u003E\u003Cpre\u003E\u003Ccode class=\"language-text\"\u003E@EnableOpenApi\n@SpringBootApplication\n@MapperScan(basePackages = {&#34;cn.ruiyeclub.dao&#34;})\npublic class Swagger3Application {\n public static void main(String[] args) {\n SpringApplication.run(Swagger3Application.class, args);\n }\n}\n\u003C\u002Fcode\u003E\u003C\u002Fpre\u003E\u003C\u002Fdiv\u003E\u003Ch2\u003E三、Swagger3Config的配置\u003C\u002Fh2\u003E\u003Cdiv class=\"highlight\"\u003E\u003Cpre\u003E\u003Ccode class=\"language-text\"\u003E@Configuration\npublic class Swagger3Config {\n @Bean\n public Docket createRestApi() {\n return new Docket(DocumentationType.OAS_30)\n .apiInfo(apiInfo())\n .select()\n .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))\n .paths(PathSelectors.any())\n .build();\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n .title(&#34;Swagger3接口文档&#34;)\n .description(&#34;更多请咨询服务开发者Ray。&#34;)\n .contact(new Contact(&#34;Ray。&#34;, &#34;http:\u002F\u002Fwww.ruiyeclub.cn&#34;, &#34;ruiyeclub@foxmail.com&#34;))\n .version(&#34;1.0&#34;)\n .build();\n }\n}\n\u003C\u002Fcode\u003E\u003C\u002Fpre\u003E\u003C\u002Fdiv\u003E\u003Ch2\u003E四、Swagger注解的使用说明\u003C\u002Fh2\u003E\u003Cdiv class=\"highlight\"\u003E\u003Cpre\u003E\u003Ccode class=\"language-text\"\u003E@Api用在请求的类上表示对类的说明\n tags=&#34;说明该类的作用可以在UI界面上看到的注解&#34;\n value=&#34;该参数没什么意义在UI界面上也看到所以不需要配置&#34;\n\n@ApiOperation用在请求的方法上说明方法的用途、作用\n value=&#34;说明方法的用途、作用&#34;\n notes=&#34;方法的备注说明&#34;\n\n@ApiImplicitParams用在请求的方法上表示一组参数说明\n @ApiImplicitParam用在@ApiImplicitParams注解中指定一个请求参数的各个方面\n name参数名\n value参数的汉字说明、解释\n required参数是否必须传\n paramType参数放在哪个地方\n · header --&gt; 请求参数的获取:@RequestHeader\n · query --&gt; 请求参数的获取:@RequestParam\n · path用于restful接口--&gt; 请求参数的获取:@PathVariable\n · div不常用\n · form不常用 \n dataType参数类型默认String其它值dataType=&#34;Integer&#34; \n defaultValue参数的默认值\n\n@ApiResponses用在请求的方法上表示一组响应\n @ApiResponse用在@ApiResponses中一般用于表达一个错误的响应信息\n code数字例如400\n message信息例如&#34;请求参数没填好&#34;\n response抛出异常的类\n\n@ApiModel用于响应类上表示一个返回响应数据的信息\n 这种一般用在post创建的时候使用@RequestBody这样的场景\n 请求参数无法使用@ApiImplicitParam注解进行描述的时候\n @ApiModelProperty用在属性上描述响应类的属性\n\u003C\u002Fcode\u003E\u003C\u002Fpre\u003E\u003C\u002Fdiv\u003E\u003Cp\u003EController层的配置\u003C\u002Fp\u003E\u003Cdiv class=\"highlight\"\u003E\u003Cpre\u003E\u003Ccode class=\"language-text\"\u003E@Api(tags = &#34;用户信息管理&#34;)\n@RestController\n@RequestMapping(&#34;userRecord&#34;)\npublic class UserRecordController extends ApiController {\n \u002F**\n * 服务对象\n *\u002F\n @Resource\n private UserRecordService userRecordService;\n\n \u002F**\n * 分页查询所有数据\n * @param page 分页对象\n * @param userRecord 查询实体\n * @return 所有数据\n *\u002F\n @ApiOperation(&#34;分页查询所有数据&#34;)\n @GetMapping(&#34;page&#34;)\n public R selectAll(Page&lt;UserRecord&gt; page, UserRecord userRecord) {\n return success(this.userRecordService.page(page, new QueryWrapper&lt;&gt;(userRecord)));\n }\n\n \u002F**\n * 通过主键查询单条数据\n * @param id 主键\n * @return 单条数据\n *\u002F\n @ApiOperation(&#34;通过主键查询单条数据&#34;)\n @GetMapping(&#34;{id}&#34;)\n public R selectOne(@PathVariable Serializable id) {\n return success(this.userRecordService.getById(id));\n }\n\n \u002F**\n * 新增数据\n * @param userRecord 实体对象\n * @return 新增结果\n *\u002F\n @ApiOperation(&#34;新增数据&#34;)\n @PostMapping(&#34;insert&#34;)\n public R insert(@RequestBody UserRecord userRecord) {\n return success(this.userRecordService.save(userRecord));\n }\n\n \u002F**\n * 修改数据\n * @param userRecord 实体对象\n * @return 修改结果\n *\u002F\n @ApiOperation(&#34;修改数据&#34;)\n @PutMapping(&#34;update&#34;)\n public R update(@RequestBody UserRecord userRecord) {\n return success(this.userRecordService.updateById(userRecord));\n }\n\n \u002F**\n * 删除数据\n * @param idList 主键结合\n * @return 删除结果\n *\u002F\n @ApiOperation(&#34;删除数据&#34;)\n @DeleteMapping(&#34;delete&#34;)\n public R delete(@RequestParam(&#34;idList&#34;) List&lt;Long&gt; idList) {\n return success(this.userRecordService.removeByIds(idList));\n }\n}\n\nView Code\u003C\u002Fcode\u003E\u003C\u002Fpre\u003E\u003C\u002Fdiv\u003E\u003Cp\u003E五、Swagger界面效果\u003C\u002Fp\u003E\u003Cp class=\"ztext-empty-paragraph\"\u003E\u003Cbr\u002F\u003E\u003C\u002Fp\u003E\u003Cfigure data-size=\"normal\"\u003E\u003Cnoscript\u003E\u003Cimg src=\"https:\u002F\u002Fpic3.zhimg.com\u002Fv2-8fac9dc146b0af4deaebf14e5d68148e_b.jpg\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"550\" data-rawheight=\"299\" class=\"origin_image zh-lightbox-thumb\" width=\"550\" data-original=\"https:\u002F\u002Fpic3.zhimg.com\u002Fv2-8fac9dc146b0af4deaebf14e5d68148e_r.jpg\"\u002F\u003E\u003C\u002Fnoscript\u003E\u003Cimg src=\"data:image\u002Fsvg+xml;utf8,&lt;svg xmlns=&#39;http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg&#39; width=&#39;550&#39; height=&#39;299&#39;&gt;&lt;\u002Fsvg&gt;\" data-caption=\"\" data-size=\"normal\" data-rawwidth=\"550\" data-rawheight=\"299\" class=\"origin_image zh-lightbox-thumb lazy\" width=\"550\" data-original=\"https:\u002F\u002Fpic3.zhimg.com\u002Fv2-8fac9dc146b0af4deaebf14e5d68148e_r.jpg\" data-actualsrc=\"https:\u002F\u002Fpic3.zhimg.com\u002Fv2-8fac9dc146b0af4deaebf14e5d68148e_b.jpg\"\u002F\u003E\u003C\u002Ffigure\u003E\u003Cp class=\"ztext-empty-paragraph\"\u003E\u003Cbr\u002F\u003E\u003C\u002Fp\u003E\u003Cp\u003ESwagger的访问路径由port\u002Fswagger-ui.html改成了 port\u002Fswagger-ui\u002F 或port\u002Fswagger-ui\u002Findex.html ,项目演示代码在 springboot-swagger\u003C\u002Fp\u003E\u003Cp class=\"ztext-empty-paragraph\"\u003E\u003Cbr\u002F\u003E\u003C\u002Fp\u003E\u003Ca href=\"https:\u002F\u002Flink.zhihu.com\u002F?target=https%3A\u002F\u002Fshimo.im\u002Fdocs\u002FILL3EcF2XlkwUMoO\u002F\" data-draft-node=\"block\" data-draft-type=\"link-card\" data-image=\"https:\u002F\u002Fpic4.zhimg.com\u002Fv2-2193dee59de82a8eeaa77f9ed0c65a63_180x120.jpg\" data-image-width=\"960\" data-image-height=\"600\" class=\" wrap external\" target=\"_blank\" rel=\"nofollow noreferrer\"\u003EJava进阶架构设计、并发编程等核心知识、电子书、视频、面试题等免费获取\u003C\u002Fa\u003E\u003Cp\u003E\u003Cb\u003E\u003Ci\u003E点击领取学习资料\u003C\u002Fi\u003E\u003C\u002Fb\u003E\u003C\u002Fp\u003E","adminClosedComment":false,"topics":[{"url":"https:\u002F\u002Fwww.zhihu.com\u002Fapi\u002Fv4\u002Ftopics\u002F20080742","type":"topic","id":"20080742","name":"Swagger"},{"url":"https:\u002F\u002Fwww.zhihu.com\u002Fapi\u002Fv4\u002Ftopics\u002F20043499","type":"topic","id":"20043499","name":"前后端分离"},{"url":"https:\u002F\u002Fwww.zhihu.com\u002Fapi\u002Fv4\u002Ftopics\u002F20001370","type":"topic","id":"20001370","name":"软件接口"}],"voteupCount":15,"voting":0,"heavyUpStatus":"allow_heavy_up","commentCount":9,"contributions":[],"isTitleImageFullScreen":false,"upvotedFollowees":[],"commercialInfo":{"isCommercial":false,"plugin":{}},"suggestEdit":{"status":false,"reason":"","tip":"","url":"","title":""},"reason":"","annotationAction":[],"canTip":false,"tipjarorsCount":0,"isLabeled":true,"hasPublishingDraft":false,"isFavorited":false,"favlistsCount":20,"isNormal":true,"status":0,"shareText":"SpringBoot整合Swagger3生成接口文档 - 来自知乎专栏,作者: 程序员糖糖 https:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F161947638 (想看更多?下载 @知乎 Apphttp:\u002F\u002Fweibo.com\u002Fp\u002F100404711598 ","canComment":{"status":true,"reason":""},"mcnFpShow":-1,"isVisible":true,"isLiked":false,"likedCount":1,"visibleOnlyToAuthor":false,"hasColumn":false,"republishers":[],"isNewLinkCard":false,"emojiReaction":{"cryFaceCount":0,"cryFaceHasSet":false,"hugCount":0,"hugHasSet":false,"likeCount":1,"likeHasSet":false,"onlookerCount":0,"onlookerHasSet":false},"abParam":{"hbAnsCard":"0"}}},"columns":{},"topics":{},"roundtables":{},"favlists":{},"comments":{},"notifications":{},"ebooks":{},"activities":{},"feeds":{},"pins":{},"promotions":{},"drafts":{},"chats":{},"posts":{},"clubs":{},"clubTags":{},"zvideos":{},"zvideoContributions":{}},"currentUser":"","account":{"lockLevel":{},"unlockTicketStatus":false,"unlockTicket":null,"challenge":[],"errorStatus":false,"message":"","isFetching":false,"accountInfo":{},"urlToken":{"loading":false}},"settings":{"socialBind":null,"inboxMsg":null,"notification":{},"email":{},"privacyFlag":null,"blockedUsers":{"isFetching":false,"paging":{"pageNo":1,"pageSize":6},"data":[]},"blockedFollowees":{"isFetching":false,"paging":{"pageNo":1,"pageSize":6},"data":[]},"ignoredTopics":{"isFetching":false,"paging":{"pageNo":1,"pageSize":6},"data":[]},"restrictedTopics":null,"laboratory":{}},"notification":{},"people":{"profileStatus":{},"activitiesByUser":{},"answersByUser":{},"answersSortByVotesByUser":{},"answersIncludedByUser":{},"votedAnswersByUser":{},"thankedAnswersByUser":{},"voteAnswersByUser":{},"thankAnswersByUser":{},"topicAnswersByUser":{},"zvideosByUser":{},"articlesByUser":{},"articlesSortByVotesByUser":{},"articlesIncludedByUser":{},"pinsByUser":{},"questionsByUser":{},"commercialQuestionsByUser":{},"favlistsByUser":{},"followingByUser":{},"followersByUser":{},"mutualsByUser":{},"followingColumnsByUser":{},"followingQuestionsByUser":{},"followingFavlistsByUser":{},"followingTopicsByUser":{},"publicationsByUser":{},"columnsByUser":{},"allFavlistsByUser":{},"brands":null,"creationsByUser":{},"creationsSortByVotesByUser":{},"creationsFeed":{},"infinity":{},"batchUsers":{}},"env":{"ab":{"config":{"experiments":[{"expId":"launch-qa_cl_guest-2","expPrefix":"qa_cl_guest","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false},{"expId":"launch-se_item-3","expPrefix":"se_item","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false},{"expId":"launch-vd_andplay_d-2","expPrefix":"vd_andplay_d","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false},{"expId":"launch-vd_hookupplay_an-2","expPrefix":"vd_hookupplay_an","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false},{"expId":"launch-vd_timeguide-2","expPrefix":"vd_timeguide","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false},{"expId":"launch-vd_video_replay-3","expPrefix":"vd_video_replay","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false},{"expId":"launch-vd_zvideo_link-10","expPrefix":"vd_zvideo_link","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false},{"expId":"launch-zanswer-2","expPrefix":"zanswer","isDynamicallyUpdated":false,"isRuntime":false,"includeTriggerInfo":false},{"expId":"vd_bullet_gui-2","expPrefix":"vd_bullet_gui","isDynamicallyUpdated":true,"isRuntime":false,"includeTriggerInfo":false}],"params":[{"id":"book_kpwz","type":"Int","value":"0","chainId":"_gene_","layerId":"Zyox","key":671},{"id":"se_timebox","type":"Int","value":"0","chainId":"_gene_","layerId":"se_timebox","key":689},{"id":"ge_rec_2th","type":"String","value":"11","chainId":"_gene_","layerId":"geli_layer_965","key":3023},{"id":"zr_slotpaidexp","type":"String","value":"1","chainId":"_all_","layerId":"zrrec_layer_5"},{"id":"se_cvr_boost","type":"Int","value":"0","chainId":"_gene_","layerId":"se_cvr_boost","key":183},{"id":"rec_3th","type":"Int","value":"11","chainId":"_gene_","layerId":"pRqt","key":697},{"id":"web_audit_01","type":"String","value":"case1","layerId":"webre_layer_1"},{"id":"gue_video_guide","type":"String","value":"1","layerId":"guevd_layer_625"},{"id":"recnew_2th","type":"Int","value":"24","chainId":"_gene_","layerId":"l-recnew_2th","key":67},{"id":"zr_expslotpaid","type":"String","value":"1","chainId":"_all_","layerId":"zrrec_layer_11"},{"id":"gue_cdzixun","type":"String","value":"0","layerId":"gueqa_layer_3"},{"id":"ge_newyanzhi","type":"String","value":"0","chainId":"_gene_","layerId":"geus_layer_1019","key":2788},{"id":"gue_bullet_guide","type":"String","value":"分享你刚编的弹幕","layerId":"guevd_layer_0"},{"id":"gue_video_replay","type":"String","value":"2","layerId":"guevd_layer_3"},{"id":"edu_cd1","type":"Int","value":"0","layerId":"l18Y"},{"id":"web_heifetz_grow_ad","type":"String","value":"1","layerId":"webgw_layer_3"},{"id":"web_sem_ab","type":"String","value":"1","layerId":"webgw_layer_3"},{"id":"ge_relation2","type":"String","value":"1","chainId":"_gene_","layerId":"gese_layer_815","key":2796},{"id":"ge_guess","type":"String","value":"0","chainId":"_gene_","layerId":"gese_layer_938","key":2912},{"id":"tp_topic_style","type":"String","value":"0","chainId":"_all_","layerId":"tptp_layer_4"},{"id":"gue_zvideo_link","type":"String","value":"1","layerId":"guevd_layer_2"},{"id":"comment","type":"Int","value":"0","chainId":"_gene_","layerId":"comment","key":644},{"id":"pf_noti_entry_num","type":"String","value":"0","chainId":"_all_","layerId":"pfus_layer_718"},{"id":"gue_iosplay","type":"String","value":"0","layerId":"guevd_layer_810"},{"id":"ge_sug_rep","type":"String","value":"1","chainId":"_gene_","layerId":"gese_layer_1034","key":3158},{"id":"gue_repost","type":"String","value":"0","layerId":"gueqa_layer_671"},{"id":"ge_search_ui","type":"String","value":"1","chainId":"_gene_","layerId":"gese_layer_838","key":2898},{"id":"ge_newcard","type":"String","value":"3","chainId":"_gene_","layerId":"geus_layer_839","key":2997},{"id":"meta_ebook","type":"Int","value":"0","layerId":"meta_ebook"},{"id":"gue_goods_card","type":"String","value":"0","layerId":"gueqa_layer_1"},{"id":"gue_art2qa","type":"String","value":"0","layerId":"gueqa_layer_579"},{"id":"web_collection_guest","type":"String","value":"1","layerId":"webqa_layer_4"},{"id":"li_panswer_topic","type":"String","value":"0","chainId":"_all_","layerId":"lili_layer_602"},{"id":"gue_visit_n_artcard","type":"String","value":"1","layerId":"gueqa_layer_579"},{"id":"vdox_cmt","type":"Int","value":"0","layerId":"9YBb"},{"id":"use_bff_profit","type":"Int","value":"0","layerId":"use_bff_profit"},{"id":"ge_v_rank_v3","type":"Int","value":"0","chainId":"_gene_","layerId":"FPcB","key":581},{"id":"andserial","type":"Int","value":"0","chainId":"_gene_","layerId":"dS1I","key":711},{"id":"web_answerlist_ad","type":"String","value":"0","layerId":"webqa_layer_1"},{"id":"ge_infinity6","type":"String","value":"0","chainId":"_gene_","layerId":"gese_layer_815","key":2817},{"id":"ge_entity","type":"String","value":"0","chainId":"_gene_","layerId":"gese_layer_946","key":3036},{"id":"gue_bullet_second","type":"String","value":"1","layerId":"guevd_layer_1"},{"id":"xuanpinceshi","type":"Int","value":"0","layerId":"xuanpinceshi"},{"id":"gue_playh_an","type":"String","value":"1","layerId":"guevd_layer_622"},{"id":"iosserial","type":"Int","value":"0","chainId":"_gene_","layerId":"dmFM","key":714},{"id":"ge_hard_s_ma","type":"String","value":"0","chainId":"_gene_","layerId":"geli_layer_856","key":3031},{"id":"li_sp_mqbk","type":"String","value":"0","chainId":"_all_","layerId":"lili_layer_748"},{"id":"tp_zrec","type":"String","value":"0","chainId":"_all_","layerId":"tptp_layer_619"},{"id":"ts_refresh","type":"Int","value":"1","layerId":"EBn6"},{"id":"click_new_tb","type":"Int","value":"0","chainId":"_gene_","layerId":"1vYQ","key":422},{"id":"ffzix_xgdzwz","type":"Int","value":"0","layerId":"ffzix_xgdzwz"},{"id":"gue_art_ui","type":"String","value":"0","layerId":"gueqa_layer_647"},{"id":"qap_question_visitor","type":"String","value":" 0","chainId":"_all_","layerId":"qapqa_layer_2"},{"id":"li_paid_answer_exp","type":"String","value":"0","chainId":"_all_","layerId":"lili_layer_3"},{"id":"ge_item","type":"String","value":"2","chainId":"_gene_","layerId":"gese_layer_945","key":2971},{"id":"gue_profile_video","type":"String","value":"1","layerId":"guevd_layer_5"},{"id":"topic_v2_jh","type":"Int","value":"0","layerId":"topic_v2_jh"},{"id":"se_mixer_roll","type":"Int","value":"0","chainId":"_gene_","layerId":"se_mixer_roll","key":699},{"id":"se_zhiplus_cpc","type":"Int","value":"0","chainId":"_gene_","layerId":"se_zhiplus_cpc","key":716},{"id":"gue_card_test","type":"String","value":"1","layerId":"gueqa_layer_2"},{"id":"webpImg","type":"Int","value":"1","layerId":"JnVt"},{"id":"ad_com_zhi","type":"Int","value":"0","chainId":"_gene_","layerId":"ad_com_zhi","key":571},{"id":"se_mixer_km","type":"Int","value":"0","chainId":"_gene_","layerId":"se_mixer_km","key":649},{"id":"gue_bulletmb","type":"String","value":"0","layerId":"guevd_layer_812"},{"id":"se_personal_ab","type":"Int","value":"0","chainId":"_gene_","layerId":"FxPl","key":554},{"id":"hwtj_bottom_btn","type":"Int","value":"1","layerId":"l-jrhg"},{"id":"Full_ans_fav","type":"Int","value":"0","chainId":"_gene_","layerId":"Pnd6","key":372},{"id":"se_warmup","type":"Int","value":"0","chainId":"_gene_","layerId":"zVTj","key":729},{"id":"gue_andplayd","type":"String","value":"1","layerId":"guevd_layer_686"},{"id":"userlinkv2","type":"Int","value":"0","layerId":"userlinkv2"},{"id":"ge_emoji","type":"String","value":"0","chainId":"_gene_","layerId":"getp_layer_827","key":3209},{"id":"ge_prf_rec","type":"String","value":"0","chainId":"_gene_","layerId":"getop_layer_991","key":3040},{"id":"hw_aa_30","type":"Int","value":"0","chainId":"_gene_","layerId":"hw_aa_30","key":361},{"id":"test_3","type":"Int","value":"0","chainId":"_gene_","layerId":"dABe","key":637},{"id":"se_prank_decay","type":"Int","value":"0","chainId":"_gene_","layerId":"se_prank_decay","key":703},{"id":"ge_dipin_pre","type":"String","value":"0","chainId":"_gene_","layerId":"gese_layer_1000","key":3124},{"id":"ge_yuzhi_v1","type":"String","value":"1","chainId":"_gene_","layerId":"gese_layer_1029","key":3127},{"id":"gue_vid_tab","type":"String","value":"0","layerId":"guevd_layer_900"},{"id":"pfd_newbie","type":"Int","value":"0","chainId":"_gene_","layerId":"pfd_newbie","key":63},{"id":"gue_q_share","type":"String","value":"0","layerId":"gueqa_layer_647"},{"id":"web_answer_list_ad","type":"String","value":"1","layerId":"webqa_layer_4"},{"id":"ge_meta_ss","type":"String","value":"0","chainId":"_gene_","layerId":"gese_layer_834","key":3079},{"id":"se_dssm","type":"Int","value":"0","chainId":"_gene_","layerId":"se_dssm","key":392},{"id":"web_login","type":"String","value":"0","layerId":"webgw_layer_759"},{"id":"se_ffzx_jushen1","type":"String","value":"0","chainId":"_all_","layerId":"sese_layer_4"},{"id":"se_cp_answer","type":"Int","value":"0","chainId":"_gene_","layerId":"WpRW","key":705},{"id":"ts_cardtitle","type":"Int","value":"0","layerId":"ZED7"},{"id":"ts_refresh2","type":"Int","value":"1","layerId":"heWh"},{"id":"km_detail_knn","type":"Int","value":"0","layerId":"l-TY59"},{"id":"se_cp_question","type":"Int","value":"0","chainId":"_gene_","layerId":"99fg","key":704},{"id":"web_column_auto_invite","type":"String","value":"0","layerId":"webqa_layer_1"},{"id":"ge_sxzx","type":"String","value":"0","chainId":"_gene_","layerId":"gere_layer_990","key":3060},{"id":"creator_hot_rec","type":"Int","value":"1","layerId":"ju92"},{"id":"se_sug_exp","type":"Int","value":"0","chainId":"_gene_","layerId":"9ZDG","key":522},{"id":"se_images","type":"Int","value":"0","chainId":"_gene_","layerId":"bwBY","key":652},{"id":"tp_contents","type":"String","value":"2","chainId":"_all_","layerId":"tptp_layer_627"},{"id":"gue_sharp","type":"String","value":"1","layerId":"guevd_layer_686"},{"id":"office_xp","type":"Int","value":"1111","layerId":"office_xp"},{"id":"ge_usercard1","type":"String","value":"0","chainId":"_gene_","layerId":"gese_layer_742","key":2740},{"id":"pf_adjust","type":"String","value":"0","chainId":"_all_","layerId":"pfus_layer_9"},{"id":"se_filter","type":"Int","value":"0","chainId":"_gene_","layerId":"2NQZ","key":363},{"id":"correct_cnn","type":"Int","value":"0","chainId":"_gene_","layerId":"correct_cnn","key":397},{"id":"an_video_tab","type":"Int","value":"0","chainId":"_gene_","layerId":"an_video_tab","key":727},{"id":"se_resnet","type":"Int","value":"0","chainId":"_gene_","layerId":"t8JE","key":730},{"id":"li_vip_verti_search","type":"String","value":"0","chainId":"_all_","layerId":"lili_layer_2"},{"id":"top_test_4_liguangyi","type":"String","value":"1","chainId":"_all_","layerId":"iosus_layer_1"},{"id":"rec_new2th","type":"Int","value":"0","chainId":"_gene_","layerId":"Hump","key":320},{"id":"se_4a","type":"Int","value":"0","chainId":"_gene_","layerId":"rtiq","key":335},{"id":"haojiakp","type":"Int","value":"0","layerId":"haojiakp"},{"id":"gue_messrec","type":"String","value":"0","layerId":"gueqa_layer_769"},{"id":"zanswer","type":"Int","value":"1","layerId":"l-zanswer"},{"id":"se_fix_ebook","type":"Int","value":"0","chainId":"_gene_","layerId":"se_fix_ebook","key":103},{"id":"se_cp_post3","type":"Int","value":"0","chainId":"_gene_","layerId":"se_cp_post3","key":706},{"id":"io_video_tab","type":"Int","value":"0","chainId":"_gene_","layerId":"io_video_tab","key":728},{"id":"gue_v_serial","type":"String","value":"1","layerId":"guevd_layer_695"},{"id":"xuanpinab","type":"Int","value":"0","layerId":"xuanpinab"},{"id":"pc_editorplugin","type":"Int","value":"0","layerId":"pc_editorplugin"},{"id":"show_ad","type":"Int","value":"0","chainId":"_gene_","layerId":"show_ad","key":27},{"id":"pfd_newbie2","type":"Int","value":"0","chainId":"_gene_","layerId":"pfd_newbie2","key":71},{"id":"se_dwd_all","type":"Int","value":"0","chainId":"_gene_","layerId":"se_dwd_all","key":621},{"id":"web_scl_rec","type":"String","value":"0","layerId":"webgw_layer_759"},{"id":"ge_video","type":"String","value":"0","chainId":"_gene_","layerId":"geli_layer_856","key":2831},{"id":"gue_fo_recom","type":"String","value":"0","layerId":"gueqa_layer_780"},{"id":"editor","type":"Int","value":"0","layerId":"editor"},{"id":"qap_question_author","type":"String","value":"0","chainId":"_all_","layerId":"qapqa_layer_2"},{"id":"gue_recmess","type":"String","value":"0","layerId":"gueqa_layer_795"},{"id":"club_fn","type":"Int","value":"1","layerId":"club_fn"},{"id":"test_rec","type":"Int","value":"10","layerId":"test_rec"},{"id":"se_zp_five","type":"Int","value":"0","chainId":"_gene_","layerId":"se_zp_five","key":344},{"id":"hw_aa_50","type":"Int","value":"0","chainId":"_gene_","layerId":"hw_aa_50","key":362},{"id":"li_edu_page","type":"String","value":"old","chainId":"_all_","layerId":"lili_layer_580"},{"id":"tp_dingyue_video","type":"String","value":"0","chainId":"_all_","layerId":"tptp_layer_4"},{"id":"Test_Punk","type":"Int","value":"0","layerId":"Test_Punk"},{"id":"ge_newbie3","type":"Int","value":"0","chainId":"_gene_","layerId":"ge_newbie3","key":180}],"chains":[{"chainId":"_all_"}],"encodedParams":"CnifArECzwu3ALkCQwDkCuwKYAuEAlYMUgu1C0UCxwIBC9wLygLXC6YBmwu7AswCOwKJAioCdAHZAokM4AtpAX0CvwI0DDcMPwAHDIgBwQLAAvQLCgKMArQKawGNAdcC2gJAAU8BZwDCAtgCGwBHAG0CDwtYAWoBtAASPAAACwALGAABAAABAQMAAAAAAAAAAgAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="},"triggers":{}},"userAgent":{"Edge":false,"IE":false,"Wechat":false,"Weibo":false,"QQ":false,"MQQBrowser":false,"Qzone":false,"Mobile":false,"Android":false,"iOS":false,"isAppleDevice":true,"Zhihu":false,"ZhihuHybrid":false,"isBot":false,"Tablet":false,"UC":false,"Sogou":false,"Qihoo":false,"Baidu":false,"BaiduApp":false,"Safari":false,"GoogleBot":false,"AndroidDaily":false,"iOSDaily":false,"WxMiniProgram":false,"BaiduMiniProgram":false,"QQMiniProgram":false,"JDMiniProgram":false,"isWebView":false,"isMiniProgram":false,"origin":"Mozilla\u002F5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit\u002F537.36 (KHTML, like Gecko) Chrome\u002F90.0.4430.212 Safari\u002F537.36"},"appViewConfig":{},"ctx":{"path":"\u002Fp\u002F161947638","query":{},"href":"http:\u002F\u002Fzhuanlan.zhihu.com\u002Fp\u002F161947638","host":"zhuanlan.zhihu.com"},"trafficSource":"production","edition":{"beijing":false,"baidu":true,"sogou":false,"baiduBeijing":false,"sogouBeijing":false,"sogouInput":false,"baiduSearch":true,"googleSearch":false,"miniProgram":false,"xiaomi":false},"theme":"light","enableShortcut":true,"referer":"https:\u002F\u002Fwww.baidu.com\u002Flink?url=h7igoYnetHQuwoN1UgjfXosCbZr-Q4xzSu1xlRdxHmkmQN_MU6U9gQ7wsJY3q0OB&wd=&eqid=c585a84b0005fe630000000660a2643a","xUDId":"","mode":"ssr","conf":{},"xTrafficFreeOrigin":"","ipInfo":{"cityName":"深圳市","countryName":"中国","regionName":"广东","countryCode":"CN"},"logged":false,"vars":{"passThroughHeaders":{}}},"me":{"columnContributions":[]},"label":{"recognizerLists":{}},"ecommerce":{},"comments":{"pagination":{},"collapsed":{},"reverse":{},"reviewing":{},"conversation":{},"parent":{}},"commentsV2":{"stickers":[],"commentWithPicPermission":{},"notificationsComments":{},"pagination":{},"collapsed":{},"reverse":{},"reviewing":{},"conversation":{},"conversationMore":{},"parent":{}},"pushNotifications":{"default":{"isFetching":false,"isDrained":false,"ids":[]},"follow":{"isFetching":false,"isDrained":false,"ids":[]},"vote_thank":{"isFetching":false,"isDrained":false,"ids":[]},"currentTab":"default","notificationsCount":{"default":0,"follow":0,"vote_thank":0}},"messages":{"data":{},"currentTab":"common","messageCount":0},"register":{"registerValidateSucceeded":null,"registerValidateErrors":{},"registerConfirmError":null,"sendDigitsError":null,"registerConfirmSucceeded":null},"login":{"loginUnregisteredError":false,"loginBindWechatError":false,"loginConfirmError":null,"sendDigitsError":null,"needSMSIdentify":false,"validateDigitsError":false,"loginConfirmSucceeded":null,"qrcodeLoginToken":"","qrcodeLoginScanStatus":0,"qrcodeLoginError":null,"qrcodeLoginReturnNewToken":false},"switches":{},"captcha":{"captchaNeeded":false,"captchaValidated":false,"captchaBase64String":null,"captchaValidationMessage":null,"loginCaptchaExpires":false},"sms":{"supportedCountries":[]},"chat":{"chats":{},"inbox":{"recents":{"isFetching":false,"isDrained":false,"isPrevDrained":false,"result":[],"next":null,"key":null},"strangers":{"isFetching":false,"isDrained":false,"isPrevDrained":false,"result":[],"next":null,"key":null},"friends":{"isFetching":false,"isDrained":false,"isPrevDrained":false,"result":[],"next":null,"key":null},"search":{"isFetching":false,"isDrained":false,"isPrevDrained":false,"result":[],"next":null,"key":null},"config":{"newCount":0,"strangerMessageSwitch":false,"strangerMessageUnread":false,"friendCount":0}},"global":{"isChatMqttExisted":false}},"emoticons":{"emoticonGroupList":[],"emoticonGroupDetail":{}},"creator":{"currentCreatorUrlToken":null,"homeData":{"recommendQuestions":[]},"tools":{"question":{"invitationCount":{"questionFolloweeCount":0,"questionTotalCount":0},"goodatTopics":[]},"customPromotion":{"itemLists":{}},"recommend":{"recommendTimes":{}}},"explore":{"academy":{"tabs":[],"article":{}}},"rights":[],"rightsStatus":{},"levelUpperLimit":10,"account":{"growthLevel":{}},"mcn":{},"applyStatus":{},"videoSupport":{},"mcnManage":{},"tasks":{},"recentlyCreated":[],"analysis":{"all":{},"answer":{},"zvideo":{},"article":{},"pin":{},"singleContent":{}},"announcement":{},"school":{"tabs":[],"contents":[],"banner":null,"entities":{}}},"answers":{"voters":{},"copyrightApplicants":{},"favlists":{},"newAnswer":{},"concernedUpvoters":{},"simpleConcernedUpvoters":{},"paidContent":{},"settings":{}},"recommendation":{"homeRecommendations":[]},"shareTexts":{},"articles":{"voters":{},"concernedUpvoters":{}},"previewPost":{},"favlists":{"relations":{}},"columns":{"voters":{}},"reward":{"answer":{},"article":{},"question":{}},"video":{"data":{},"shareVideoDetail":{},"last":{}},"topstory":{"recommend":{"isFetching":false,"isDrained":false,"afterId":0,"items":[],"next":null},"follow":{"isFetching":false,"isDrained":false,"afterId":0,"items":[],"next":null},"room":{"meta":{},"isFetching":false,"afterId":0,"items":[],"next":null},"followWonderful":{"isFetching":false,"isDrained":false,"afterId":0,"items":[],"next":null},"sidebar":null,"announcement":{},"hotListCategories":[],"hotList":[],"guestFeeds":{"isFetching":false,"isDrained":false,"afterId":0,"items":[],"next":null},"followExtra":{"isNewUser":null,"isFetched":false,"followCount":0,"followers":[]},"hotDaily":{"data":[],"paging":{}},"hotHighlight":{"isFetching":false,"isDrained":false,"data":[],"paging":{}},"banner":{}},"readStatus":{},"column":{},"requestColumn":{"categories":[],"error":null},"articleContribution":{"contributeRequests":[],"deleteContributeIdList":[],"handledContributeIdList":[],"recommendedColumns":[],"pinnedColumns":[],"sentContributeRequestsIdList":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},"columnContribution":{"contributeRequests":[],"autoInviteEnabled":false,"recommendedContributors":[],"contributionInvitation":null},"draftHistory":{"history":{},"drafts":{}},"upload":{},"articleDraft":{"titleImage":"","titleImageSize":{},"isTitleImageFullScreen":false,"canTitleImageFullScreen":false,"title":"","titleImageUploading":false,"error":"","content":"","draftLoading":false,"updating":false,"globalLoading":false,"pendingVideo":{"resource":null,"error":null},"deleteFail":{"fail":false},"recommendTopics":[],"selectedColumn":0,"articleDisclaimers":[]},"articleDrafts":{"isDrained":false,"isLoading":false,"items":[]},"columnAutocomplete":{"users":[],"friends":[]},"columnCollection":{},"userProfit":{"permission":{"permissionStatus":{"zhiZixuan":0,"recommend":-1,"task":0,"plugin":0,"infinity":0},"visible":false}},"mcn":{"bindInfo":{},"memberCategoryList":[],"producerList":[],"categoryList":[],"lists":{},"banners":{},"protocolStatus":{"isAgreedNew":true,"isAgreedOld":true},"probationCountdownDays":0},"zvideos":{"campaigns":{},"tagoreCategory":[],"recommendations":{},"insertable":{},"recruit":{"form":{"platform":"","nickname":"","followerCount":"","domain":"","contact":""},"submited":false,"ranking":[]},"club":{},"qyActivityData":{},"batchVideos":{},"contribution":{"selectedContribution":null,"configs":{},"contributionLists":{},"recommendQuestions":{"isLoading":true,"paging":{"isEnd":false,"isStart":true,"totals":0},"data":[]},"questionSearchResults":{"isLoading":true,"paging":{"isEnd":false,"isStart":true,"totals":0},"data":[]}}},"republish":{}},"fetchHost":"www.zhihu.com","subAppName":"column"}</script><script crossorigin="" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/vendor.bfefaa5cfee5584ea98c.js"></script><script crossorigin="" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/column.app.efeca058bbd73033743f.js"></script><script src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/hm.js" async=""></script><script crossorigin="" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/zap.js"></script><script src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/push.js"></script><div><div style="display: none;">想来知乎工作?请发送邮件到 jobs@zhihu.com</div></div><div><div><div class="css-8pdeid"></div></div></div><script crossorigin="" src="./SpringBoot整合Swagger3生成接口文档 - 知乎_files/emoticon.js"></script><div><div><div class="Editable-languageSuggestions" style="left: -1179px; top: -999px;"><div><div class="Popover"><label class="Editable-languageSuggestionsInput Input-wrapper"><input autocomplete="off" role="combobox" aria-expanded="false" aria-autocomplete="list" aria-activedescendant="AutoComplete23-0" id="Popover22-toggle" aria-haspopup="true" aria-owns="Popover22-content" class="Input" placeholder="选择语言" value=""><svg class="Zi Zi--Select" fill="#afbdcf" viewBox="0 0 24 24" width="24" height="24"><path d="M12 16.183l2.716-2.966a.757.757 0 0 1 1.064.001.738.738 0 0 1 0 1.052l-3.247 3.512a.758.758 0 0 1-1.064 0L8.22 14.27a.738.738 0 0 1 0-1.052.758.758 0 0 1 1.063 0L12 16.183zm0-9.365L9.284 9.782a.758.758 0 0 1-1.064 0 .738.738 0 0 1 0-1.052l3.248-3.512a.758.758 0 0 1 1.065 0L15.78 8.73a.738.738 0 0 1 0 1.052.757.757 0 0 1-1.063.001L12 6.818z" fill-rule="evenodd"></path></svg></label></div></div></div></div></div></body></html>