前言
- 关于过滤的东西我们全部讲完了,今天主要来讲下分组。
- 当项目过去庞大时,一个组可能不能满足我们的需求。
- 我们需要对项目的不同功能进行分组,方便查看和区分。
groupName()分组
-
首先我们看下,默认的有哪些分组?启动项目。
-
-
默认只有一个分组
default
,默认分组。 -
源码如下:
-
/** * If more than one instance of Docket exists, each one must have a unique groupName as * supplied by this method. Defaults to "default". * * @param groupName - the unique identifier of this swagger group/configuration * @return this Docket */ public Docket groupName(String groupName) { this.groupName = defaultIfAbsent(groupName, this.groupName); return this; } 复制代码
-
-
那么
this.groupName
的值呢