File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/main/java/com/spring4all/swagger Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >com.spring4all</groupId >
88 <artifactId >swagger-spring-boot-starter</artifactId >
9- <version >2.0.0. SNAPSHOT</version >
9+ <version >2.0.0- SNAPSHOT</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 @@ -59,14 +59,18 @@ public Docket createRestApi() {
5959 Class <?>[] ignoredParameterTypes = swaggerProperties .getIgnoredParameterTypes ().toArray (array );
6060 builder .ignoredParameterTypes (ignoredParameterTypes );
6161
62+ //
63+ if (swaggerProperties .getGlobalOperationParameters () != null ) {
64+ builder .globalRequestParameters (globalRequestParameters (swaggerProperties ));
65+ }
66+
6267 // 需要生成文档的接口目标配置
6368 Docket docket = builder .select ()
6469 // 通过扫描包选择接口
6570 .apis (RequestHandlerSelectors .basePackage (swaggerProperties .getBasePackage ()))
6671 // 通过路径匹配选择接口
6772 .paths (paths (swaggerProperties ))
68- .build ()
69- .globalRequestParameters (globalRequestParameters (swaggerProperties ));
73+ .build ();
7074
7175 return docket ;
7276 }
You can’t perform that action at this time.
0 commit comments