数据库连接时时区的问题
1.Caused by: java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
错误原因:
数据库连接没有设置时区:
解决方法:
注意写法jdbc:mysql://localhost:3306/business?serverTimezone=UTC&characterEncoding=utf-8&useSSL=false中的***&***可能不会被识别
代码:
jdbc:mysql://localhost:3306/business?serverTimezone=UTC&characterEncoding=utf-8&useSSL=false