Working log

Spring Boot Default Timezone, Locale 설정하기

까오기 2021. 12. 14. 14:44
@SpringBootApplication
public class ExampleApplication {

    @PostConstruct
    public void started() {
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
        Locale.setDefault(Locale.KOREA);
    }
    
    public static void main(String[] args) {
        SpringApplication.run(ExampleApplication.class, args);
    }

}

끝 ~~~