- 使用mysql-connector-java 6.x版本触发问题
1
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.
解决:url加上serverTimezone参数1
jdbc:mysql://localhost:3306/mmorpg?serverTimezone=UTC&characterEncoding=utf-8
- druid连接池导致异常:java.sql.SQLException: validateConnection false
解决方法,加上效率配置1
2
3
4
5
6
7<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
destroy-method="close">
....
<!--验证是否链接成功-->
<property name="validationQuery" value="${jdbc.validateQuery}"/>
<property name="validationQueryTimeout" value="${jdbc.validationQueryTimeout}"/>
</bean>