hibernate 查询mysq的datetime的值为null或者0000-00-00 00:00:00 报错
spring.datasource.url配置改下增加zeroDateTimeBehavior=convertToNull如下server.port=9004spring.application.name=ihrm-system #指定服务名spring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.datasourc...
·
spring.datasource.url配置改下增加zeroDateTimeBehavior=convertToNull
如下
server.port=9004
spring.application.name=ihrm-system #指定服务名
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/ihrm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
spring.datasource.username=root
spring.datasource.password=123456
spring.jpa.database=mysql
spring.jpa.show-sql=true
spring.jpa.open-in-view=true
更多推荐
已为社区贡献1条内容
所有评论(0)