propertiesclass1 섹션 8-4 [외부 설정을 이용한 자동 구성] 프로퍼티 클래스의 분리 @Value값 디폴트 설정하기@MyAutoConfiguration @ConditionalMyOnClass("org.apache.catalina.startup.Tomcat") public class TomcatWebServerConfig { @Value("${contextPath:/}") String contextPath; @Bean("tomcatWebServerFactory") public ServletWebServerFactory servletWebServerFactory() { TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(); factory.setContextPath(this.contextPath); return .. 2024. 7. 26. 이전 1 다음