spring整合mybatis,在部署项目时,一直报错:dao无法注入ioc容器
Error creating bean with name ‘accountController’: Unsatisfied dependency expressed through field ‘accountService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘accountService’: Unsatisfied dependency expressed through field ‘accountDao’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.whut.dao.IAccountDao’ available: expected at least 1 bean which qualifies as autowire candidate.
spring的配置文件已经配置了sqlSessionFactory,注解扫描也已经开启,注解也加上了。查了一些资料都是说注解未开启
<!-- 配置SqlSession的工厂 -->