com.github.datalking.web.config.DelegatingWebMvcConfiguration Maven / Gradle / Ivy
package com.github.datalking.web.config;
import com.github.datalking.annotation.Autowired;
import com.github.datalking.annotation.Configuration;
import com.github.datalking.web.support.HandlerMethodArgumentResolver;
import com.github.datalking.web.support.HandlerMethodReturnValueHandler;
import java.util.List;
/**
* @author yaoo on 4/25/18
*/
@Configuration
public class DelegatingWebMvcConfiguration extends WebMvcConfigurationSupport {
private final WebMvcConfigurerComposite configurers = new WebMvcConfigurerComposite();
@Autowired(required = false)
public void setConfigurers(List configurers) {
if (configurers == null || configurers.isEmpty()) {
return;
}
this.configurers.addWebMvcConfigurers(configurers);
}
@Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
this.configurers.addResourceHandlers(registry);
}
@Override
protected void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
this.configurers.configureDefaultServletHandling(configurer);
}
// @Override
// protected void addInterceptors(InterceptorRegistry registry) {
// this.configurers.addInterceptors(registry);
// }
//
// @Override
// protected void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
// this.configurers.configureContentNegotiation(configurer);
// }
//
// @Override
// public void configurePathMatch(PathMatchConfigurer configurer) {
// this.configurers.configurePathMatch(configurer);
// }
//
@Override
protected void addViewControllers(ViewControllerRegistry registry) {
this.configurers.addViewControllers(registry);
}
@Override
protected void addArgumentResolvers(List argumentResolvers) {
this.configurers.addArgumentResolvers(argumentResolvers);
}
@Override
protected void addReturnValueHandlers(List returnValueHandlers) {
this.configurers.addReturnValueHandlers(returnValueHandlers);
}
//
// @Override
// protected void configureMessageConverters(List> converters) {
// this.configurers.configureMessageConverters(converters);
// }
//
// @Override
// public void configureAsyncSupport(AsyncSupportConfigurer configurer) {
// this.configurers.configureAsyncSupport(configurer);
// }
//
// @Override
// protected void addFormatters(FormatterRegistry registry) {
// this.configurers.addFormatters(registry);
// }
//
// @Override
// protected Validator getValidator() {
// return this.configurers.getValidator();
// }
//
// @Override
// protected MessageCodesResolver getMessageCodesResolver() {
// return this.configurers.getMessageCodesResolver();
// }
//
// @Override
// protected void configureHandlerExceptionResolvers(List exceptionResolvers) {
// this.configurers.configureHandlerExceptionResolvers(exceptionResolvers);
// }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy