问题:在整合ssm项目时,遇到异常 如下,无法从数据库获取数据:
Request processing failed
; nested exception is org
.mybatis
.spring
.MyBatisSystemException
: nested exception is org
.apache
.ibatis
.exceptions
.PersistenceException
解决方法:在spring配置文件spring.xml,jdbc的连接语句中,加上时区设置:&serverTimezone=UTC
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=UTF-8"></property>