错误信息: 结果com.jd.ecodd.param.concat.client.vo.QuerySceneTypeVo结果集不包含值
java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.jd.ecodd.param.concat.client.vo.QuerySceneTypeVo
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:888)
at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:640)
at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:344)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:290)
at org.apache.ibatis.builder. . StatementBuilder.parseStatementNode( StatementBuilder.java:109)
错误原因:因为我在mapper. 文件上面定义了resultMap:
<resultMap id=\"QuerySceneTypeVo\" type=\"com.jd.ecodd.param.concat.client.vo.QuerySceneTypeVo\">
<result column=\"id\" property=\"id\"/>
<result column=\"source_type\" property=\"sourceType\"/>
<result column=\"source_type_code\" property=\"sourceTypeCode\"/>
</resultMap>
而我在下面写select方法的使用引用的非已经定义好的结果集,而引用的是原包:
<select id=\"get\"
parameterType=\"java.lang.String\"
resultMap=\"com.jd.ecodd.param.concat.client.vo.QuerySceneTypeVo\">
SELECT
<include refid=\" Colum\"/>
FROM t_tableName
<where>
<if test=\"source!=null and source!=\'\'\">
and source LIKE CONCAT (\'%\',#{source},\'%\')
</if>
</where>
</select>
以上两种方式冲突,所以报了这个错误。
解决方法:使用其中一种返回方式就可以了。
继续阅读与本文标签相同的文章
上一篇 :
静态网站与动态网站的优缺点有哪些?
下一篇 :
AI少女无法启动怎么办?无法启动游戏解决方法
-
基础c4d教程:简单的木质吊灯建模,小白也能学会
2026-05-18栏目: 教程
-
大族激光:智能装备LION系列光纤激光切割机发布仪式在湘隆重召开
2026-05-18栏目: 教程
-
实拍上汽首个“无人”仓库,本月正式运行
2026-05-18栏目: 教程
-
自动驾驶光车以外的硬件就7万 滴滴想让你不买车就能先坐上
2026-05-18栏目: 教程
-
滴滴迎来大整顿!1000万罚单认清现实,8万司机被开除
2026-05-18栏目: 教程
