Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource

Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource,第1张

Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource

整合SSM时遇到的错误
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘class path resource [com/kuang/mapper/UserMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘class path resource [com/kuang/mapper/UserMapper.xml]’. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.kuang.mapper.UserMapper.selectUser. please check com/kuang/mapper/UserMapper.xml and class path resource [com/kuang/mapper/UserMapper.xml]

原因:

多写了一份这个东西
跟Spring里面的冲突
删掉编译成功

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

原文地址: http://outofmemory.cn/zaji/5482058.html

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

发表评论

登录后才能评论

评论列表(0条)

保存