springboot2.0 连接数据库需要设置时区
#mysql
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/springboot?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=
#jpa
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
加上serverTimezone=Asia/Shanghai,中国的标准时间,不然会报时区错误
来源:https://blog.csdn.net/pzc_3018/article/details/100922027