Class WebConfig

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware

    @EnableSwagger2
    @Configuration
    @ImportResource("WEB-INF/config/v2/springmvc-v2-servlet.xml")
    public class WebConfig
    extends org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
    Spring configuration which replace tag. It allows override default RequestMappingHandlerMapping with our own mapping handler
    • Constructor Summary

      Constructors 
      Constructor Description
      WebConfig()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      springfox.documentation.spring.web.plugins.Docket apiDocumentation()  
      protected springfox.documentation.service.OAuth clientCredentialFlow()  
      void configureContentNegotiation​(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer)  
      protected void configureHandlerExceptionResolvers​(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers)  
      protected void configureMessageConverters​(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> converters)  
      protected boolean isLegacyContentNegotiationEnabled()  
      protected springfox.documentation.service.OAuth passwordFlow()  
      org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping requestMappingHandlerMapping​(org.springframework.web.accept.ContentNegotiationManager mvcContentNegotiationManager, org.springframework.format.support.FormattingConversionService mvcConversionService, org.springframework.web.servlet.resource.ResourceUrlProvider mvcResourceUrlProvider)  
      void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)  
      springfox.documentation.spring.web.json.JacksonModuleRegistrar swaggerJacksonModuleRegistrar()  
      • Methods inherited from class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport

        addArgumentResolvers, addCorsMappings, addDefaultHandlerExceptionResolvers, addDefaultHttpMessageConverters, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, beanNameHandlerMapping, configureAsyncSupport, configureDefaultServletHandling, configurePathMatch, configureViewResolvers, createExceptionHandlerExceptionResolver, createRequestMappingHandlerAdapter, createRequestMappingHandlerMapping, defaultServletHandlerMapping, extendHandlerExceptionResolvers, extendMessageConverters, flashMapManager, getApplicationContext, getArgumentResolvers, getAsyncSupportConfigurer, getConfigurableWebBindingInitializer, getCorsConfigurations, getDefaultMediaTypes, getInterceptors, getMessageCodesResolver, getMessageConverters, getPathMatchConfigurer, getReturnValueHandlers, getServletContext, getValidator, handlerExceptionResolver, handlerFunctionAdapter, httpRequestHandlerAdapter, localeResolver, mvcContentNegotiationManager, mvcConversionService, mvcHandlerMappingIntrospector, mvcPathMatcher, mvcPatternParser, mvcResourceUrlProvider, mvcUriComponentsContributor, mvcUrlPathHelper, mvcValidator, mvcViewResolver, requestMappingHandlerAdapter, resourceHandlerMapping, routerFunctionMapping, setServletContext, simpleControllerHandlerAdapter, themeResolver, viewControllerHandlerMapping, viewNameTranslator
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebConfig

        public WebConfig()
    • Method Detail

      • requestMappingHandlerMapping

        @Bean
        public org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping requestMappingHandlerMapping​(org.springframework.web.accept.ContentNegotiationManager mvcContentNegotiationManager,
                                                                                                                               org.springframework.format.support.FormattingConversionService mvcConversionService,
                                                                                                                               org.springframework.web.servlet.resource.ResourceUrlProvider mvcResourceUrlProvider)
        Overrides:
        requestMappingHandlerMapping in class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
      • swaggerJacksonModuleRegistrar

        @Bean
        public springfox.documentation.spring.web.json.JacksonModuleRegistrar swaggerJacksonModuleRegistrar()
      • configureMessageConverters

        protected void configureMessageConverters​(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
        Overrides:
        configureMessageConverters in class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
      • configureHandlerExceptionResolvers

        protected void configureHandlerExceptionResolvers​(java.util.List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers)
        Overrides:
        configureHandlerExceptionResolvers in class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Overrides:
        setApplicationContext in class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
        Throws:
        org.springframework.beans.BeansException
      • configureContentNegotiation

        public void configureContentNegotiation​(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer)
        Overrides:
        configureContentNegotiation in class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
      • apiDocumentation

        @Bean
        public springfox.documentation.spring.web.plugins.Docket apiDocumentation()
      • isLegacyContentNegotiationEnabled

        protected boolean isLegacyContentNegotiationEnabled()
      • passwordFlow

        protected springfox.documentation.service.OAuth passwordFlow()
      • clientCredentialFlow

        protected springfox.documentation.service.OAuth clientCredentialFlow()