1.java目录下无法编译到target类路径下,导致mapper总resource无法加加载到mapper配置:错误如下
Error building SqlSession.
The error may exist in com/fxf/dao/UserMapper.xml
Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/fxf/dao/UserMapper.xml
解决方法,在pom.xml中加入如下配置:
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
2、mysql数据源中,时间未配置出现错误:
Cause: java.sql.SQLException: The server time zone value ‘�й���ʱ��’ is unrecognized or represent