2121 * * * *
2222 * * *
2323 * *
24- *
24+ *
2525 */
2626
2727package org .springdoc .webflux .ui ;
2828
2929import java .util .Optional ;
3030
31- import org .springdoc .core .properties .SpringDocConfigProperties ;
3231import org .springdoc .core .properties .SwaggerUiConfigProperties ;
3332import org .springdoc .core .providers .ActuatorProvider ;
3433
3837import static org .springdoc .core .utils .Constants .ALL_PATTERN ;
3938import static org .springdoc .core .utils .Constants .CLASSPATH_RESOURCE_LOCATION ;
4039import static org .springdoc .core .utils .Constants .DEFAULT_WEB_JARS_PREFIX_URL ;
40+ import static org .springdoc .core .utils .Constants .SWAGGER_UI_PREFIX ;
4141import static org .springframework .util .AntPathMatcher .DEFAULT_PATH_SEPARATOR ;
4242
4343/**
@@ -67,30 +67,22 @@ public class SwaggerWebFluxConfigurer implements WebFluxConfigurer {
6767 */
6868 private final SwaggerUiConfigProperties swaggerUiConfigProperties ;
6969
70- /**
71- * The Spring doc config properties.
72- */
73- private final SpringDocConfigProperties springDocConfigProperties ;
74-
75- /**
70+ /**
7671 * Instantiates a new Swagger web flux configurer.
7772 *
7873 * @param swaggerUiConfigProperties the swagger ui calculated config
79- * @param springDocConfigProperties the spring doc config properties
8074 * @param swaggerIndexTransformer the swagger index transformer
8175 * @param actuatorProvider the actuator provider
8276 * @param swaggerResourceResolver the swagger resource resolver
8377 */
8478 public SwaggerWebFluxConfigurer (SwaggerUiConfigProperties swaggerUiConfigProperties ,
85- SpringDocConfigProperties springDocConfigProperties ,
86- SwaggerIndexTransformer swaggerIndexTransformer ,
79+ SwaggerIndexTransformer swaggerIndexTransformer ,
8780 Optional <ActuatorProvider > actuatorProvider , SwaggerResourceResolver swaggerResourceResolver ) {
8881 this .swaggerIndexTransformer = swaggerIndexTransformer ;
8982 this .actuatorProvider = actuatorProvider ;
9083 this .swaggerResourceResolver = swaggerResourceResolver ;
9184 this .swaggerUiConfigProperties = swaggerUiConfigProperties ;
92- this .springDocConfigProperties = springDocConfigProperties ;
93- }
85+ }
9486
9587 @ Override
9688 public void addResourceHandlers (ResourceHandlerRegistry registry ) {
@@ -100,7 +92,7 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
10092 uiRootPath .append (swaggerPath , 0 , swaggerPath .lastIndexOf (DEFAULT_PATH_SEPARATOR ));
10193 if (actuatorProvider .isPresent () && actuatorProvider .get ().isUseManagementPort ())
10294 uiRootPath .append (actuatorProvider .get ().getBasePath ());
103- registry .addResourceHandler (uiRootPath + springDocConfigProperties . getWebjars (). getPrefix () + ALL_PATTERN )
95+ registry .addResourceHandler (uiRootPath + SWAGGER_UI_PREFIX + ALL_PATTERN )
10496 .addResourceLocations (CLASSPATH_RESOURCE_LOCATION + DEFAULT_WEB_JARS_PREFIX_URL + DEFAULT_PATH_SEPARATOR )
10597 .resourceChain (false )
10698 .addResolver (swaggerResourceResolver )
0 commit comments