您当前的位置: 首页 >  Java

水的精神

暂无认证

  • 1浏览

    0关注

    711博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Cause: java.lang.IllegalArgumentException: Result Maps collection contains value for com.angus.dao

水的精神 发布时间:2019-07-11 11:07:35 ,浏览量:1

错误如下,

org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sqlSessionFactory' defined in class path resource
[spring/applicationContext.xml]:
Invocation of init method failed;
nested exception is org.springframework.core.NestedIOException:
Failed to parse mapping resource: 'file
[E:\ideaworkspace\ssmdemo\target\classes\sqlMap\StudentMapper.xml]';
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.
Cause: java.lang.IllegalArgumentException:
Result Maps collection contains value for com.angus.dao.StudentMapper.BaseResultMap already

错误原因是

 mybatis 的 ***Mapper.xml 文件里边有错误了。 

org.springframework.beans.factory.BeanCreationException:

使用类路径资源中定义的名称为“sqlSessionFactory”创建bean时出错

(spring /中):

初始化方法调用失败;

嵌套异常是org.springframe .core. nestedioexception:

解析映射资源失败:'file

目标\ [E: \ ideaworkspace \ ssmdemo \ \ sqlMap \ StudentMapper.xml类)”;

嵌套异常是org.apache.ibatis.builder。BuilderException:错误解析映射器XML。

原因:java.lang.IllegalArgumentException:

Result Maps集合包含com.angus.dao.StudentMapper的值。

  红色标出的部分,说明是xml文件出错。我是重新生成了一份。然后问题就解决了。 

关注
打赏
1664074814
查看更多评论
立即登录/注册

微信扫码登录

0.0365s