在
spring
中配置
hibernate
出現該問題,網上說了,原因是因為使用的
mysql
連接配接庫版本太高的原因,網上給出的改法為:
将
dataSource
中的
jdbc:mysql://localhost:3306/yinyousentence
改成
jdbc:mysql://localhost:3306/yinyousentence?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&aserverTimezone=UTC
如果是一般的項目,這麼改就可以了,但是對于配置在spring裡的hibernate來說,這麼配并不完全清晰和準确。