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]

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

多写了一份这个东西
Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource跟Spring里面的冲突了
删掉,编译成功
Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource

上一篇:4-2 ADO.NET-查询和检索数据10


下一篇:「ROS实践笔记」Creating a ROS msg and srv