From f0d5a06eb4010d33629303466fef6e8214d5b8c9 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 15 Sep 2023 09:37:32 +0900 Subject: [PATCH] =?UTF-8?q?=ED=86=B0=EC=BA=A3=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/foundation/boot/ServletConfig.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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