Maven和Mybatis整合时打包漏掉mapper的xml文件及其它资源
在pom.xml中配置
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
如果还是没解决
还需要查看mapper.xml中 namespace 是否是类的全路径明,
标签id是否是方法明 ,传入参数和返回参数类型是否与方法一致。