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 66
77 <groupId >com.spring4all</groupId >
88 <artifactId >spring-boot-starter-swagger</artifactId >
9- <version >1.5.0 .RELEASE</version >
9+ <version >1.5.1 .RELEASE</version >
1010
1111 <name >spring-boot-starter-swagger</name >
1212 <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() {
5050 @ ConditionalOnProperty (name = "swagger.enabled" , matchIfMissing = true )
5151 public List <Docket > createRestApi (SwaggerProperties swaggerProperties ) {
5252 ConfigurableBeanFactory configurableBeanFactory = (ConfigurableBeanFactory ) beanFactory ;
53+ List <Docket > docketList = new LinkedList <>();
5354
5455 // 没有分组
5556 if (swaggerProperties .getDocket ().size () == 0 ) {
@@ -81,7 +82,6 @@ public List<Docket> createRestApi(SwaggerProperties swaggerProperties) {
8182 excludePath .add (PathSelectors .ant (path ));
8283 }
8384
84-
8585 Docket docket = new Docket (DocumentationType .SWAGGER_2 )
8686 .host (swaggerProperties .getHost ())
8787 .apiInfo (apiInfo )
@@ -98,11 +98,11 @@ public List<Docket> createRestApi(SwaggerProperties swaggerProperties) {
9898 .build ();
9999
100100 configurableBeanFactory .registerSingleton ("defaultDocket" , docket );
101- return null ;
101+ docketList .add (docket );
102+ return docketList ;
102103 }
103104
104105 // 分组创建
105- List <Docket > docketList = new LinkedList <>();
106106 for (String groupName : swaggerProperties .getDocket ().keySet ()) {
107107 SwaggerProperties .DocketInfo docketInfo = swaggerProperties .getDocket ().get (groupName );
108108
You can’t perform that action at this time.
0 commit comments