|
|
@ -114,7 +114,7 @@ import org.springframework.web.servlet.config.annotation.ResourceChainRegistrati
|
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration;
|
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration;
|
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver;
|
|
|
|
import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver;
|
|
|
|
import org.springframework.web.servlet.handler.AbstractUrlHandlerMapping;
|
|
|
|
import org.springframework.web.servlet.handler.AbstractUrlHandlerMapping;
|
|
|
|
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
|
|
|
|
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
|
|
|
@ -146,7 +146,7 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
@ConditionalOnWebApplication(type = Type.SERVLET)
|
|
|
|
@ConditionalOnWebApplication(type = Type.SERVLET)
|
|
|
|
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class,
|
|
|
|
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class,
|
|
|
|
WebMvcConfigurerAdapter.class })
|
|
|
|
WebMvcConfigurer.class })
|
|
|
|
@ConditionalOnMissingBean(WebMvcConfigurationSupport.class)
|
|
|
|
@ConditionalOnMissingBean(WebMvcConfigurationSupport.class)
|
|
|
|
@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE + 10)
|
|
|
|
@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE + 10)
|
|
|
|
@AutoConfigureAfter({ DispatcherServletAutoConfiguration.class,
|
|
|
|
@AutoConfigureAfter({ DispatcherServletAutoConfiguration.class,
|
|
|
@ -170,15 +170,15 @@ public class WebMvcAutoConfiguration {
|
|
|
|
return new OrderedHttpPutFormContentFilter();
|
|
|
|
return new OrderedHttpPutFormContentFilter();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Defined as a nested config to ensure WebMvcConfigurerAdapter is not read when not
|
|
|
|
// Defined as a nested config to ensure WebMvcConfigurer is not read when not
|
|
|
|
// on the classpath
|
|
|
|
// on the classpath
|
|
|
|
@Configuration
|
|
|
|
@Configuration
|
|
|
|
@Import({ EnableWebMvcConfiguration.class, MvcValidatorRegistrar.class })
|
|
|
|
@Import({ EnableWebMvcConfiguration.class, MvcValidatorRegistrar.class })
|
|
|
|
@EnableConfigurationProperties({ WebMvcProperties.class, ResourceProperties.class })
|
|
|
|
@EnableConfigurationProperties({ WebMvcProperties.class, ResourceProperties.class })
|
|
|
|
public static class WebMvcAutoConfigurationAdapter extends WebMvcConfigurerAdapter {
|
|
|
|
public static class WebMvcAutoConfigurationAdapter implements WebMvcConfigurer {
|
|
|
|
|
|
|
|
|
|
|
|
private static final Log logger = LogFactory
|
|
|
|
private static final Log logger = LogFactory
|
|
|
|
.getLog(WebMvcConfigurerAdapter.class);
|
|
|
|
.getLog(WebMvcConfigurer.class);
|
|
|
|
|
|
|
|
|
|
|
|
private final ResourceProperties resourceProperties;
|
|
|
|
private final ResourceProperties resourceProperties;
|
|
|
|
|
|
|
|
|
|
|
|