File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/main/java/com/spring4all/swagger Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<groupId >com.spring4all</groupId >
8
8
<artifactId >spring-boot-starter-swagger</artifactId >
9
- <version >1.5.0 .RELEASE</version >
9
+ <version >1.5.1 .RELEASE</version >
10
10
11
11
<name >spring-boot-starter-swagger</name >
12
12
<url >https://github.com/SpringForAll/spring-boot-starter-swagger</url >
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ public SwaggerProperties swaggerProperties() {
50
50
@ ConditionalOnProperty (name = "swagger.enabled" , matchIfMissing = true )
51
51
public List <Docket > createRestApi (SwaggerProperties swaggerProperties ) {
52
52
ConfigurableBeanFactory configurableBeanFactory = (ConfigurableBeanFactory ) beanFactory ;
53
+ List <Docket > docketList = new LinkedList <>();
53
54
54
55
// 没有分组
55
56
if (swaggerProperties .getDocket ().size () == 0 ) {
@@ -81,7 +82,6 @@ public List<Docket> createRestApi(SwaggerProperties swaggerProperties) {
81
82
excludePath .add (PathSelectors .ant (path ));
82
83
}
83
84
84
-
85
85
Docket docket = new Docket (DocumentationType .SWAGGER_2 )
86
86
.host (swaggerProperties .getHost ())
87
87
.apiInfo (apiInfo )
@@ -98,11 +98,11 @@ public List<Docket> createRestApi(SwaggerProperties swaggerProperties) {
98
98
.build ();
99
99
100
100
configurableBeanFactory .registerSingleton ("defaultDocket" , docket );
101
- return null ;
101
+ docketList .add (docket );
102
+ return docketList ;
102
103
}
103
104
104
105
// 分组创建
105
- List <Docket > docketList = new LinkedList <>();
106
106
for (String groupName : swaggerProperties .getDocket ().keySet ()) {
107
107
SwaggerProperties .DocketInfo docketInfo = swaggerProperties .getDocket ().get (groupName );
108
108
You can’t perform that action at this time.
0 commit comments