您的位置:首页 > 其它

Invalid bound statement (not found): xxx.xxxx.method解决办法

2017-05-12 15:09 696 查看
在SpringBoot 集成 Mybatis 时,在Eclipse里运行项目一切正常,但打包成 jar 文件在命令行支行时报错:

Invalid bound statement (not found): xxx.xxxx.method

在检查mapper.xml文件里的配置均无错后,

则需要在pom.xml文件里加入以下内容:

<resources>
<resource>
<directory>src/main/java</directory>
<!-- Mapper.xml文件位置 -->
<includes>
<include>**/mapper/**/*.xml</include>
</includes>
</resource>
<!--指定资源的位置-->
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>


重新打包成 jar 运行成功!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mybatis