java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for " 此处为包名"
错误原因是命名空间找不到: 以info.xml为例
1.查看mybitis-config.xml 中mappers中是否添加了此xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<!--set lazy fetching-->
<setting name="lazyLoadingEnabled" value="false" />
</settings>
<mappers>
<mapper resource="ibatis/info/info.xml"/>
</mappers>
</configuration>
2.查看info.xml中namespace属性
<mapper namespace="cn.com.cc.info.dao.XDao"> 名值对确认无误就OK了