错误描述:
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘deptController’: Unsatisfied dependency expressed through field ‘idb’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.biz.IDeptBiz’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
解决方法:
- 查看自己的service,controller层的注解有没有写
- 查看自己的各种实现类有没有实现对应的接口(我就是忘了实现接口。。注意是按照接口注入的,所以一定要实现接口啊啊啊啊啊啊~~~)