톰캣 설정(jsp페이지 로드 ) 테스트
parent
042524ab32
commit
4dbc9384ae
@ -0,0 +1,26 @@
|
||||
package cokr.xit.base.boot;
|
||||
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
import cokr.xit.foundation.boot.CommonConfig;
|
||||
import cokr.xit.foundation.boot.DatasourceConfig;
|
||||
import cokr.xit.foundation.boot.ServletConfig;
|
||||
import cokr.xit.foundation.boot.TomcatConfig;
|
||||
import cokr.xit.foundation.boot.TransactionConfig;
|
||||
|
||||
@SpringBootApplication
|
||||
@ImportAutoConfiguration({
|
||||
CommonConfig.class,
|
||||
ServletConfig.class,
|
||||
MvcConfig2.class,
|
||||
DatasourceConfig.class,
|
||||
TransactionConfig.class,
|
||||
SecurityConfig.class,
|
||||
TomcatConfig.class
|
||||
})
|
||||
@ContextConfiguration("classpath:spring/context-*.xml")
|
||||
public class XitBaseApplication2 {
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package cokr.xit.foundation.boot;
|
||||
|
||||
import org.apache.catalina.Context;
|
||||
import org.apache.catalina.webresources.ExtractingRoot;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class TomcatConfig {
|
||||
@Bean
|
||||
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> servletContainerCustomizer() {
|
||||
return (TomcatServletWebServerFactory container) -> {
|
||||
container.addContextCustomizers((Context context) -> {
|
||||
context.setResources(new ExtractingRoot());
|
||||
context.setReloadable(false);
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue