hibernate.jdbc.time_zone = UTC ignored

后端 未结 3 2223
我寻月下人不归
我寻月下人不归 2021-02-15 13:02

Using set up as

  • Spring framework 5.0.2.RELEASE
  • Spring Security 5.0.0.RELEASE
  • Hibernate 5.2.11.Final

I followed spring boot &

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-15 13:05

    Try this(it worked for me). Write below code snippet in your spring boot main application file.

    @PostConstruct
    public void started() {
        TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
    }
    

    Source

提交回复
热议问题