diff --git a/src/main/java/cokr/xit/foundation/boot/ServletConfig.java b/src/main/java/cokr/xit/foundation/boot/ServletConfig.java index 0d20766..5718a14 100644 --- a/src/main/java/cokr/xit/foundation/boot/ServletConfig.java +++ b/src/main/java/cokr/xit/foundation/boot/ServletConfig.java @@ -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 servletContainerCustomizer() { + return (TomcatServletWebServerFactory container) -> { + container.addContextCustomizers((Context context) -> { + context.setResources(new ExtractingRoot()); + context.setReloadable(false); + }); + }; + } + } \ No newline at end of file