### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (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.) ### The error may exist in file [E:\Software Istall\Eclipse Project\Tomcat\Tomcat_9.0\apache-tomcat-9.0.21\wtpwebapps\chuan_zang_help\WEB-INF\classes\cn\ydyfc\chuan_zang_help\mapper\AdminMapper.xml] ### The error may involve cn.ydyfc.chuan_zang_help.dao.AdminMapper.selectAllAdmins ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (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.)] with root cause com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
錯誤提示:The server time zone value '???ú±ê×??±??' is unrecognized or represents more than one time zone.
錯誤原因:多方查詢發現是mysql得時區問題,比實際時間要早,所以需要在JDBC得連接URL后面加上serverTimezone=GMT即可解決問題,低版本得5.xxx沒有存在這個時區問題,8.0這些才存在這個問題