具体报错信息为:
Error creating bean with name 'ageContactController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ageContactService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.cnbi.crm.service.ITimeTaskService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)}
看下spring配置文件里面这个bean的路径以及类名是不是完全正确的。追问
不是spring问题,其它的是可以的,只是单独这个出问题,导致不能启动
追答“看下spring配置文件里面这个bean的路径以及类名是不是完全正确的”,这个正确的?
你是采用注解的方式的么?那么这个bean是不是有声明注册成springbean。
还有其他可能就是这个java类没编译成功,所以应用启动的时候classloader没有load到class。
那个ageContactController是实现类吧?注解不能用于接口哈。