Mapped Statements collection does not contain value for
来源:互联网 发布:自卫武器 知乎 编辑:程序博客网 时间:2024/05/18 00:47
SSM碰到这个问题,可能情况有这几种:
1、mapper.xml中没有加入namespace
2、mapper.xml中的方法和接口mapper的方法不对应
3、mapper.xml没有加入到mybatis-config.xml中(即总的配置文件),例外:配置了mapper文件的包路径的除外
4、mapper.xml文件名和所写的mapper名称不相同。
5、mapper包中的mapper.xml没有编译到targger中。
看了一下前面四种都是没有错的于是想到maven的配置文件可能有问题,
因为我的配置文件全部都会放在target文件目录下,这个消费者没有配置所以出错,于是加上如下代码(每个人的情况不一样,根据实际情况而定)
<resources> <resource> <targetPath>${project.build.directory}/classes</targetPath> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> </resource></resources>
问题就解决了
0 0
- batis 错误 Mapped Statements collection does not contain value for
- mybatis错误 Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for...
- Mapped Statements collection does not contain value for RelateMarketingMapper....解决办法
- mybatis错误 Mapped Statements collection does not contain value for
- mybatis错误 Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for *
- Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for的解决方法
- Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for Addressbook.pageSelect
- Mapped Statements collection does not contain value for Addressbook.getByIds
- Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for
- Mapped Statements collection does not contain value for xxxx
- IOS 页面上面出现白色空白
- Uncaught TypeError: XX is not a function at HTMLInputElement.onclick
- win10下安装quartus ii15.0+ModelSim10.4
- Linux为什么能发展壮大
- 类之间的关系
- Mapped Statements collection does not contain value for
- mongodb开发--java
- 【模板】逆序数,java大数,2014 Multi-University Training Contest 5,
- viewpager同步
- threejs设置对象层次
- 数据结构 树、二叉树、完全二叉树
- 如何在Windows下安装gensim
- LeetCode : Number of Boomerangs
- [勇者闯LeetCode] 215. Kth Largest Element in an Array