|
|
|
@ -4,7 +4,11 @@ import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.apache.catalina.Context;
|
|
|
|
|
import org.apache.catalina.servlets.DefaultServlet;
|
|
|
|
|
import org.apache.catalina.webresources.ExtractingRoot;
|
|
|
|
|
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
|
|
|
|
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
|
|
|
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
|
|
|
|
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
@ -67,4 +71,15 @@ public class ServletConfig {
|
|
|
|
|
|
|
|
|
|
return bean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> servletContainerCustomizer() {
|
|
|
|
|
return (TomcatServletWebServerFactory container) -> {
|
|
|
|
|
container.addContextCustomizers((Context context) -> {
|
|
|
|
|
context.setResources(new ExtractingRoot());
|
|
|
|
|
context.setReloadable(false);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|