具体异常报错:Caused by: 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.)
原因:数据库时区设置不对,导致无法连接数据库
解决方案:在配置文件数据库的访问路径加上?serverTimezone=GMT即可解决,如:
jdbc.url=jdbc:mysql://localhost:3306/gz2204?serverTimezone=GMT。