Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### Th

Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### Th,第1张

Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### Th 错误产生环境

单独测试 mybatis 环境

错误描述

Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error building SqlSession.
### The error may exist in cn/bloghut/dao/StudentMapper.xml
### The error occurred while processing mapper_resultMap[StudentTeacher]
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'cn/bloghut/dao/StudentMapper.xml'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for cn.bloghut.dao.StudentMapper.getStudents. please check cn/bloghut/dao/StudentMapper.xml and cn/bloghut/dao/StudentMapper.xml

错误原因

mapper.xml文件 的标签标签 的id属性重名了

解决办法

修改id属性的名字即可

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5636985.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存