300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for...

Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for...

时间:2024-01-11 13:15:56

相关推荐

Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for...

网上搜索了一圈解决方案,都未解决我碰到的问题,好在最终对代码一字一句的斟酌,终于发现了端倪。现将他人的解决方案汇总一下:

在mapper.xml文件中,报错的resultMap未写出其引用的resultMap在mapper.xml文件中,将resultTyperesultMap弄混淆

经过多次反复检查,mapper.xml里并有上述错误,最终发现出错地方在:

application.properties中:

<!-- 错误写法,mapperLocation少了个s-->mybatis.mapperLocation=classpath:mappers/*Mapper.xml <!-- 正确写法,mapperLocations-->mybatis.mapperLocations=classpath:mappers/*Mapper.xml

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。