由于想把mybatis的mapper文件和dao层放到一起所以在pom中添加了
所以编译时会忽略resources文件中的配置文件,所以pom.xml的<build>标签中修改为
<!--指定mapper存放路径-->
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<!--指定配置文件存放路径-->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>