Package org.springdoc.webmvc.ui
Class SwaggerWebMvcConfigurer
java.lang.Object
org.springdoc.ui.AbstractSwaggerConfigurer
org.springdoc.webmvc.ui.SwaggerWebMvcConfigurer
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
public class SwaggerWebMvcConfigurer
extends org.springdoc.ui.AbstractSwaggerConfigurer
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
The type Swagger web mvc configurer.
- Author:
- bnasslahsen
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springdoc.ui.AbstractSwaggerConfigurer
org.springdoc.ui.AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig -
Constructor Summary
ConstructorsConstructorDescriptionSwaggerWebMvcConfigurer(org.springdoc.core.properties.SwaggerUiConfigProperties swaggerUiConfigProperties, org.springframework.boot.autoconfigure.web.WebProperties springWebProperties, org.springframework.boot.webmvc.autoconfigure.WebMvcProperties springWebMvcProperties, SwaggerIndexTransformer swaggerIndexTransformer, SwaggerResourceResolver swaggerResourceResolver, SwaggerWelcomeCommon swaggerWelcomeCommon) Instantiates a new Swagger web mvc configurer. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgumentResolvers(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> argumentResolvers) voidaddCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry) voidaddFormatters(org.springframework.format.FormatterRegistry registry) voidaddInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) voidaddResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) voidaddReturnValueHandlers(List<org.springframework.web.method.support.HandlerMethodReturnValueHandler> returnValueHandlers) protected voidaddSwaggerResourceHandler(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry, org.springdoc.ui.AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig handlerConfig) Add a resource handler that uses the Swagger resource resolver and transformer.protected voidaddSwaggerResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry, org.springdoc.ui.AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig... handlerConfigs) Add resource handlers that use the Swagger resource resolver and transformer.voidaddViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry) voidconfigureAsyncSupport(org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer configurer) voidconfigureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer) voidconfigureDefaultServletHandling(org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer configurer) voidconfigureHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers) voidconfigureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) voidconfigurePathMatch(org.springframework.web.servlet.config.annotation.PathMatchConfigurer configurer) voidconfigureViewResolvers(org.springframework.web.servlet.config.annotation.ViewResolverRegistry registry) voidextendHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers) voidextendMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) protected org.springframework.cache.CachegetCache()Gets the Swagger resource chain cache.org.springframework.validation.MessageCodesResolverprotected Stringorg.springframework.validation.Validatorprotected StringMethods inherited from class org.springdoc.ui.AbstractSwaggerConfigurer
combinePatterns, getSwaggerHandlerConfigs, getSwaggerWebjarHandlerConfigsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addErrorResponseInterceptors, configureApiVersioning, configureMessageConverters
-
Constructor Details
-
SwaggerWebMvcConfigurer
public SwaggerWebMvcConfigurer(org.springdoc.core.properties.SwaggerUiConfigProperties swaggerUiConfigProperties, org.springframework.boot.autoconfigure.web.WebProperties springWebProperties, org.springframework.boot.webmvc.autoconfigure.WebMvcProperties springWebMvcProperties, SwaggerIndexTransformer swaggerIndexTransformer, SwaggerResourceResolver swaggerResourceResolver, SwaggerWelcomeCommon swaggerWelcomeCommon) Instantiates a new Swagger web mvc configurer.- Parameters:
swaggerUiConfigProperties- the swagger ui calculated configspringWebProperties- the spring web configspringWebMvcProperties- the spring mvc configswaggerIndexTransformer- the swagger index transformerswaggerResourceResolver- the swagger resource resolverswaggerWelcomeCommon- the swagger welcome common
-
-
Method Details
-
addResourceHandlers
public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) - Specified by:
addResourceHandlersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addSwaggerResourceHandlers
protected void addSwaggerResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry, org.springdoc.ui.AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig... handlerConfigs) Add resource handlers that use the Swagger resource resolver and transformer.- Parameters:
registry- the resource handler registry.handlerConfigs- the swagger handler configs.
-
addSwaggerResourceHandler
protected void addSwaggerResourceHandler(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry, org.springdoc.ui.AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig handlerConfig) Add a resource handler that uses the Swagger resource resolver and transformer.- Parameters:
registry- the resource handler registry.handlerConfig- the swagger handler config.
-
getUiRootPath
- Specified by:
getUiRootPathin classorg.springdoc.ui.AbstractSwaggerConfigurer
-
getWebjarsPathPattern
- Specified by:
getWebjarsPathPatternin classorg.springdoc.ui.AbstractSwaggerConfigurer
-
getCache
protected org.springframework.cache.Cache getCache()Gets the Swagger resource chain cache.- Returns:
- the cache.
-
configurePathMatch
public void configurePathMatch(org.springframework.web.servlet.config.annotation.PathMatchConfigurer configurer) - Specified by:
configurePathMatchin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureContentNegotiation
public void configureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer) - Specified by:
configureContentNegotiationin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureAsyncSupport
public void configureAsyncSupport(org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer configurer) - Specified by:
configureAsyncSupportin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureDefaultServletHandling
public void configureDefaultServletHandling(org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer configurer) - Specified by:
configureDefaultServletHandlingin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addFormatters
public void addFormatters(org.springframework.format.FormatterRegistry registry) - Specified by:
addFormattersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addInterceptors
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) - Specified by:
addInterceptorsin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addCorsMappings
public void addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry) - Specified by:
addCorsMappingsin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addViewControllers
public void addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry registry) - Specified by:
addViewControllersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureViewResolvers
public void configureViewResolvers(org.springframework.web.servlet.config.annotation.ViewResolverRegistry registry) - Specified by:
configureViewResolversin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addArgumentResolvers
public void addArgumentResolvers(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> argumentResolvers) - Specified by:
addArgumentResolversin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addReturnValueHandlers
public void addReturnValueHandlers(List<org.springframework.web.method.support.HandlerMethodReturnValueHandler> returnValueHandlers) - Specified by:
addReturnValueHandlersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureMessageConverters
public void configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) - Specified by:
configureMessageConvertersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
extendMessageConverters
public void extendMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) - Specified by:
extendMessageConvertersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
configureHandlerExceptionResolvers
public void configureHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers) - Specified by:
configureHandlerExceptionResolversin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
extendHandlerExceptionResolvers
public void extendHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers) - Specified by:
extendHandlerExceptionResolversin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
getValidator
@Nullable public org.springframework.validation.Validator getValidator()- Specified by:
getValidatorin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
getMessageCodesResolver
@Nullable public org.springframework.validation.MessageCodesResolver getMessageCodesResolver()- Specified by:
getMessageCodesResolverin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-