在搭建maven项目测试时,报The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. 错误

解决办法:

在config.properties配置文件中对于MySQL的URL后面加上时区配置

serverTimezone=Asia/Shanghai

config.properties

jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/alice?serverTimezone=Asia/Shanghai&useSSL=false&useUnicode=true&characterEncoding=utf8
jdbc.username=root
jdbc.password=****

 

相关文章:

  • 2022-12-23
  • 2021-06-06
  • 2021-09-01
  • 2022-01-13
  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-12
  • 2021-09-10
  • 2021-10-05
  • 2022-12-23
相关资源
相似解决方案