/************************************************************ * * @packageName : io.company.localhost * @fileName : LocalhostApplication.java * @author : 조인제 * @date : 24.12.06 * @description : * * =========================================================== * DATE AUTHOR NOTE * ----------------------------------------------------------- * 24.12.06 조인제 최초 생성 * *************************************************************/ package io.company.localhost; import java.util.Locale; import java.util.TimeZone; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration; import org.springframework.scheduling.annotation.EnableScheduling; import io.company.localhost.common.config.ComponentScanConfig; import io.company.localhost.common.context.ApplicationContextProvider; import lombok.extern.slf4j.Slf4j; @Slf4j @EnableScheduling @SpringBootApplication(scanBasePackageClasses = { ApplicationContextProvider.class , ComponentScanConfig.class} , exclude = {DataSourceTransactionManagerAutoConfiguration.class, TransactionAutoConfiguration.class , JacksonAutoConfiguration.class}) public class LocalhostApplication { public LocalhostApplication(@Value("${project.locale}") Locale defaultLocale, @Value("${project.time-zone}") TimeZone defaultTimeZone) { log.debug("yaml locale {}", defaultLocale); log.debug("yaml locale {}", Locale.KOREA); log.debug("yaml timeZone {}", defaultTimeZone.getID()); log.debug("yaml timeZone {}", defaultTimeZone.getDisplayName()); log.debug("yaml timeZone {}", defaultTimeZone.getID()); log.debug("yaml timeZone {}", TimeZone.getTimeZone("UTC").getID()); log.debug("yaml timeZone {}", TimeZone.getDefault().getID()); // default Locale, default TimeZone 설정 Locale.setDefault(defaultLocale); TimeZone.setDefault(defaultTimeZone); log.debug("yaml locale {}", Locale.getDefault()); log.debug("yaml timeZone {}", TimeZone.getDefault().getID()); } public static void main(String[] args) { SpringApplication.run( LocalhostApplication.class, args); } }