File tree 2 files changed +10
-12
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/core
springdoc-openapi-ui/src/main/java/org/springdoc/ui
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 15
15
import org .apache .commons .lang3 .StringUtils ;
16
16
import org .slf4j .Logger ;
17
17
import org .slf4j .LoggerFactory ;
18
- import org .springdoc .core .converters .ModelConverterRegistrar ;
19
18
import org .springframework .beans .factory .config .BeanDefinition ;
20
19
import org .springframework .boot .autoconfigure .AutoConfigurationPackages ;
21
20
import org .springframework .context .ApplicationContext ;
Original file line number Diff line number Diff line change @@ -48,15 +48,6 @@ public void afterPropertiesSet() {
48
48
calculateUiRootPath ();
49
49
}
50
50
51
- private void calculateUiRootPath () {
52
- StringBuilder sbUrl = new StringBuilder ();
53
- if (StringUtils .isNotBlank (mvcServletPath ))
54
- sbUrl .append (mvcServletPath );
55
- if (swaggerPath .contains (DEFAULT_PATH_SEPARATOR ))
56
- sbUrl .append (swaggerPath .substring (0 , swaggerPath .lastIndexOf (DEFAULT_PATH_SEPARATOR )));
57
- this .uiRootPath =sbUrl .toString ();
58
- }
59
-
60
51
@ Operation (hidden = true )
61
52
@ GetMapping (SWAGGER_UI_PATH )
62
53
public String redirectToUi (HttpServletRequest request ) {
@@ -99,5 +90,13 @@ private void buildConfigUrl(HttpServletRequest request) {
99
90
swaggerUiConfig .setOauth2RedirectUrl (ServletUriComponentsBuilder .fromCurrentContextPath ().path (this .uiRootPath ).path (swaggerUiConfig .getOauth2RedirectUrl ()).build ().toString ());
100
91
}
101
92
}
102
-
103
- }
93
+
94
+ private void calculateUiRootPath () {
95
+ StringBuilder sbUrl = new StringBuilder ();
96
+ if (StringUtils .isNotBlank (mvcServletPath ))
97
+ sbUrl .append (mvcServletPath );
98
+ if (swaggerPath .contains (DEFAULT_PATH_SEPARATOR ))
99
+ sbUrl .append (swaggerPath .substring (0 , swaggerPath .lastIndexOf (DEFAULT_PATH_SEPARATOR )));
100
+ this .uiRootPath =sbUrl .toString ();
101
+ }
102
+ }
You can’t perform that action at this time.
0 commit comments