首页 > 其他 > 详细

invalid bound statement (not found)

时间:2019-04-23 14:25:30      阅读:132      评论:0      收藏:0      [点我收藏+]

mybatis代码生成器生成的mapper类,在service中使用@Autowired报错 Could not autowire. No beans of ‘AccountMapper‘ type found.

直接运行代码,接口访问报错

技术分享图片

查询后,知道需要在pom.xml文件中的<build>中配置了resource,不然mapper.xml文件就会被漏掉

<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>

invalid bound statement (not found)

原文:https://www.cnblogs.com/tianphone/p/10756010.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!