用maven配置mybatis时,有可能会报错找不到mybatis的配置文件,而且有可能连mapper映射文件也找不到,解决方法时在pom中配置一下路径,在build标签里加入自己路径
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>mybatis-config.xml</include>
<include>mapper/InfoMapper.xml</include>
</includes>
</resource>
</resources>