File tree Expand file tree Collapse file tree 3 files changed +42
-9
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/core
main/java/org/springdoc/webmvc/ui
test/java/test/org/springdoc/ui/app3 Expand file tree Collapse file tree 3 files changed +42
-9
lines changed Original file line number Diff line number Diff line change @@ -305,11 +305,6 @@ public final class Constants {
305
305
*/
306
306
public static final String HEALTH_PATTERN = "/health/*" ;
307
307
308
- /**
309
- * The constant SWAGGER_UI_PATTERN.
310
- */
311
- public static final String SWAGGER_UI_PATTERN = SWAGGER_UI_PREFIX + ALL_PATTERN ;
312
-
313
308
/**
314
309
* The constant SPRINGDOC_USE_MANAGEMENT_PORT.
315
310
*/
Original file line number Diff line number Diff line change 28
28
import org .springframework .web .servlet .config .annotation .ResourceHandlerRegistry ;
29
29
import org .springframework .web .servlet .config .annotation .WebMvcConfigurerAdapter ;
30
30
31
- import static org .springdoc .core .Constants .ALL_PATTERN ;
32
31
import static org .springdoc .core .Constants .CLASSPATH_RESOURCE_LOCATION ;
33
32
import static org .springdoc .core .Constants .DEFAULT_WEB_JARS_PREFIX_URL ;
34
- import static org .springdoc .core .Constants .SWAGGER_UI_PATTERN ;
33
+ import static org .springdoc .core .Constants .SWAGGER_UI_PREFIX ;
35
34
import static org .springframework .util .AntPathMatcher .DEFAULT_PATH_SEPARATOR ;
36
35
37
36
/**
@@ -79,8 +78,7 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
79
78
if (actuatorProvider .isPresent () && actuatorProvider .get ().isUseManagementPort ())
80
79
uiRootPath .append (actuatorProvider .get ().getBasePath ());
81
80
82
- uiRootPath .append (ALL_PATTERN );
83
- registry .addResourceHandler (uiRootPath + SWAGGER_UI_PATTERN )
81
+ registry .addResourceHandler (uiRootPath +SWAGGER_UI_PREFIX +"*/**" )
84
82
.addResourceLocations (CLASSPATH_RESOURCE_LOCATION + DEFAULT_WEB_JARS_PREFIX_URL + DEFAULT_PATH_SEPARATOR )
85
83
.resourceChain (false )
86
84
.addTransformer (swaggerIndexTransformer );
Original file line number Diff line number Diff line change
1
+ /*
2
+ *
3
+ * *
4
+ * * * Copyright 2019-2020 the original author or authors.
5
+ * * *
6
+ * * * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * * * you may not use this file except in compliance with the License.
8
+ * * * You may obtain a copy of the License at
9
+ * * *
10
+ * * * https://www.apache.org/licenses/LICENSE-2.0
11
+ * * *
12
+ * * * Unless required by applicable law or agreed to in writing, software
13
+ * * * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * * * See the License for the specific language governing permissions and
16
+ * * * limitations under the License.
17
+ * *
18
+ *
19
+ */
20
+
21
+ package test .org .springdoc .ui .app3 ;
22
+
23
+ /**
24
+ * @author bnasslashen
25
+ */
26
+
27
+ import org .springframework .context .annotation .Configuration ;
28
+ import org .springframework .web .servlet .config .annotation .PathMatchConfigurer ;
29
+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
30
+ import org .springframework .web .util .pattern .PathPatternParser ;
31
+
32
+ @ Configuration
33
+ public class WebConfig implements WebMvcConfigurer {
34
+
35
+ @ Override
36
+ public void configurePathMatch (PathMatchConfigurer configurer ) {
37
+ configurer
38
+ .setPatternParser (new PathPatternParser ());
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments