org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘userDaoImpl‘: Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: private com.dao.UserMapper com.service.UserDaoImpl.userMapper;
nested exception is org.springframework.Beans.Factory.nosuchbeandefinitionexception: Noqualifying Bean of type[com.DAO.Usermapper]found forDependency:expected at least1Bean which qualifies as Autowire candidate for ThisDependency. DependencyAnnotations: {@org.springframework.Beans.Factory.annotation.autowired(Required=true)}
Cause, in the spring configuration file can not sweep the DAO file under Mapper, may be the path is wrong.
My reason is: the path more than one classpath:
So it's good to get rid of classpath.
From for notes (Wiz)
MyBatis Integration SS, can not autowire use mapper automatic injection, cannot find bean:nosuchbeandefinitionexception