错误信息1:
【警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4e61f1ed -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
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.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)】
错误信息2:
Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezon
原因分析:Mysql8.0版本以后数据库默认时区是美国时区;
解决方案:
参考代码:
在编码格式设置前加上:
default-time-zone='+8:00'
其他文档: