zoukankan      html  css  js  c++  java
  • The server time zone value '???ú±ê×??±??' is unrecognized or represents more than one time zone.错误解决办法以及原因

    ### 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 IstallEclipse ProjectTomcatTomcat_9.0apache-tomcat-9.0.21wtpwebappschuan_zang_helpWEB-INFclassescnydyfcchuan_zang_helpmapperAdminMapper.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这些才存在这个问题

  • 相关阅读:
    clientHeight获取屏幕可视化高度
    vue-particles粒子动画插件的使用和爬坑出现垂直滚动条
    合并数组 扩展运算符
    深拷贝和类型检测
    05showLoading配置和 <text>标签的坑 如何发送请求 分享功能和懒加载
    HDU1875 畅通工程再续
    洛谷P1991 无线通讯网(最小生成树性质+连通块)
    Codeforces Round #621 (Div. 1 + Div. 2) C. Cow and Message
    洛谷P2330 [SCOI2005]繁忙的都市
    HDU2612 Find a way (跑两遍BFS)
  • 原文地址:https://www.cnblogs.com/tanglie/p/11111416.html
Copyright © 2011-2022 走看看