Created
June 5, 2017 15:06
-
-
Save luizrobertofreitas/9fd82af9031619d30d9e7b9a58c10bf7 to your computer and use it in GitHub Desktop.
Setting UTC timezone spring-boot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
public class Application { | |
@PostConstruct | |
void started() { | |
TimeZone.setDefault(TimeZone.getTimeZone("UTC")); | |
} | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This causes my project to initialize 2 times.