use of org.springframework.boot.autoconfigure.web.ConditionalOnEnabledResourceChain in project spring-boot by spring-projects.
the class FreeMarkerServletWebConfiguration method resourceUrlEncodingFilter.
@Bean
@ConditionalOnEnabledResourceChain
@ConditionalOnMissingFilterBean(ResourceUrlEncodingFilter.class)
FilterRegistrationBean<ResourceUrlEncodingFilter> resourceUrlEncodingFilter() {
FilterRegistrationBean<ResourceUrlEncodingFilter> registration = new FilterRegistrationBean<>(new ResourceUrlEncodingFilter());
registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ERROR);
return registration;
}
Aggregations