maven + mybatis Invalid bound statement (not found) 错误解决

来源:互联网 发布:郑州淘宝网店加盟被抓 编辑:程序博客网 时间:2024/05/29 19:57

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是否是方法明 ,传入参数和返回参数类型是否与方法一致。

阅读全文
0 0
原创粉丝点击