Class APIConfig

  • All Implemented Interfaces:
    org.springframework.web.servlet.config.annotation.WebMvcConfigurer

    @EnableWebMvc
    @ControllerScan("org.cxbox.core.controller")
    @EnableConfigurationProperties(APIProperties.class)
    public class APIConfig
    extends Object
    implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.fasterxml.jackson.databind.ObjectMapper objectMapper  
    • Constructor Summary

      Constructors 
      Constructor Description
      APIConfig()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addArgumentResolvers​(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> argumentResolvers)  
      void configureMessageConverters​(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)  
      org.springframework.web.servlet.LocaleResolver localeResolver​(org.cxbox.api.service.session.CoreSessionService coreSessionService, org.cxbox.api.service.LocaleService localeService)  
      org.springframework.web.multipart.MultipartResolver multipartResolver()  
      • Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer

        addCorsMappings, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
    • Field Detail

      • objectMapper

        @Qualifier("cxboxObjectMapper")
        protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • Constructor Detail

      • APIConfig

        public APIConfig()
    • Method Detail

      • addArgumentResolvers

        public void addArgumentResolvers​(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> argumentResolvers)
        Specified by:
        addArgumentResolvers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      • configureMessageConverters

        public void configureMessageConverters​(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
        Specified by:
        configureMessageConverters in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      • multipartResolver

        @Bean
        @ConditionalOnProperty(value="cxbox.bean.multipart-resolver.enabled",
                               matchIfMissing=true)
        public org.springframework.web.multipart.MultipartResolver multipartResolver()
      • localeResolver

        @Bean(name="localeResolver")
        public org.springframework.web.servlet.LocaleResolver localeResolver​(org.cxbox.api.service.session.CoreSessionService coreSessionService,
                                                                             org.cxbox.api.service.LocaleService localeService)