Java教程

java.sql.SQLException: The server time zone value xx is unrecognized or represents more than one ti

本文主要是介绍java.sql.SQLException: The server time zone value xx is unrecognized or represents more than one ti,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

这个报错是由于连接数据版本问题,在连接数据库库的url加上:

?serverTimezone=UTC

  如下:

spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/test?serverTimezone=UTC
    username: root
    password: 1234

  

这篇关于java.sql.SQLException: The server time zone value xx is unrecognized or represents more than one ti的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!