[kotlin] SpringBoot Timezone 설정

Spring Boot

SpringBoot 실행 시 타임존이 맞지 않아서 난감한 경우가 발생하여 알아보니 다음과 같은 방법으로 해결할 수 있었다.

01
02
03
04
05
06
07
08
09
10
11
package com.itchefblog.project
 
import 어쩌고
 
 @ApringBootApplication
class PackageApplication {
    @PostConstruct
    fun started() {
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"))
    }
}