Mabatis配置錯誤日誌

A_Nan%發表於2020-12-06

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘adminService’: Unsatisfied dependency expressed through field ‘adminDao’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘adminDao’ defined in file [E:\apache-tomcat-8.5.55\wtpwebapps\Backstage_management\WEB-INF\classes\com\hp\dao\AdminDao.class]: Cannot resolve reference to bean ‘sqlSessionFactory’ while setting bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [config/springmvc.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘com/hp/mapper/AnimalMapper.xml’. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.hp.dao.AnimalDao.listou

mapper配置的對映檔案錯誤 在com/hp/mapper/AnimalMapper.xml瞭解下
com.hp.dao.AnimalDao裡id="listout"重複

相關文章