diff --git a/src/main/java/today/seasoning/seasoning/SeasoningApplication.java b/src/main/java/today/seasoning/seasoning/SeasoningApplication.java index 86777f1..0fe06d8 100644 --- a/src/main/java/today/seasoning/seasoning/SeasoningApplication.java +++ b/src/main/java/today/seasoning/seasoning/SeasoningApplication.java @@ -1,9 +1,14 @@ package today.seasoning.seasoning; +import java.time.LocalDateTime; +import java.util.TimeZone; +import javax.annotation.PostConstruct; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; +@Slf4j @EnableScheduling @SpringBootApplication public class SeasoningApplication { @@ -12,4 +17,10 @@ public static void main(String[] args) { SpringApplication.run(SeasoningApplication.class, args); } + @PostConstruct + void setTimeZone() { + TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul")); + log.info("Server Time : {}", LocalDateTime.now()); + } + }