@Configuration @EnableWebMvc @EnableHypermediaSupport(type=HAL) @EnableEntityLinks @ComponentScan(basePackageClasses=RestExceptionHandler.class) public class WebServicesConfig extends org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
FilteringJackson2HttpMessageConverter.
- Default media type handling
- CORS filter support
- GZIP compression of request responses using the 'Accept-Encoding: gzip,deflate' header.
- Resource handling for webjars and Swagger UI| Constructor and Description |
|---|
WebServicesConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFormatters(org.springframework.format.FormatterRegistry registry) |
void |
addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) |
void |
configureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer) |
void |
configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) |
CorsFilter |
corsFilter() |
org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer |
servletContainerCustomizer() |
addArgumentResolvers, addCorsMappings, addInterceptors, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureDefaultServletHandling, configureHandlerExceptionResolvers, configurePathMatch, configureViewResolvers, extendMessageConverters, getMessageCodesResolver, getValidatorpublic void configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
configureMessageConverters in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurerconfigureMessageConverters in class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapterpublic void configureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer)
configureContentNegotiation in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurerconfigureContentNegotiation in class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter@Bean public CorsFilter corsFilter()
public void addFormatters(org.springframework.format.FormatterRegistry registry)
addFormatters in interface org.springframework.web.servlet.config.annotation.WebMvcConfigureraddFormatters in class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter@Bean public org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer servletContainerCustomizer()
public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
addResourceHandlers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigureraddResourceHandlers in class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapterCopyright © 2016. All rights reserved.