zoukankan      html  css  js  c++  java
  • Javaweb项目中出现java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone.异常

    javaweb项目中java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. 异常,如下图:

    服务器时区值“????±××?±?无法识别或代表一个以上的时区。如果希望利用时区支持,则必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性)以使用更具体的时区值。

    修改从c3p0-config.xml配置文件

     <default-config>
         <property name="driverClass">com.mysql.jdbc.Driver</property>
         <property name="jdbcUrl">jdbc:mysql://localhost/hejh
         ?useUnicode=true&amp;useJDBCCompliantTimezoneShift=true&amp;useLegacyDatetimeCode=false&amp;serverTimezone=UTC</property>
         <property name="user">root</property>
         <property name="password">root</property>
        
        
        <property name="initialPoolSize">20</property>
        <property name="maxIdleTime">30</property>
        <property name="maxPoolSize">100</property>
        <property name="minPoolSize">10</property>
        <property name="maxStatements">200</property>
      </default-config>

    即可。

  • 相关阅读:
    4.2. 入门案例
    4.1. Scrapy配置安装
    4. Scrapy框架
    2.6. 案例:使用BeautifuSoup4的爬虫
    2.03_01_Python网络爬虫urllib2库
    2.06_Python网络爬虫_正则表达式
    2.04_Python网络爬虫_Requests模块
    2.03_Python网络爬虫Http和Https
    TCP协议的三次握手
    从零开始搭建VUE项目
  • 原文地址:https://www.cnblogs.com/hejh/p/11346332.html
Copyright © 2011-2022 走看看