File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 1515import org .apache .commons .lang3 .StringUtils ;
1616import org .slf4j .Logger ;
1717import org .slf4j .LoggerFactory ;
18- import org .springdoc .core .converters .ModelConverterRegistrar ;
1918import org .springframework .beans .factory .config .BeanDefinition ;
2019import org .springframework .boot .autoconfigure .AutoConfigurationPackages ;
2120import org .springframework .context .ApplicationContext ;
Original file line number Diff line number Diff line change @@ -48,15 +48,6 @@ public void afterPropertiesSet() {
4848 calculateUiRootPath ();
4949 }
5050
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-
6051 @ Operation (hidden = true )
6152 @ GetMapping (SWAGGER_UI_PATH )
6253 public String redirectToUi (HttpServletRequest request ) {
@@ -99,5 +90,13 @@ private void buildConfigUrl(HttpServletRequest request) {
9990 swaggerUiConfig .setOauth2RedirectUrl (ServletUriComponentsBuilder .fromCurrentContextPath ().path (this .uiRootPath ).path (swaggerUiConfig .getOauth2RedirectUrl ()).build ().toString ());
10091 }
10192 }
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