51,408
社区成员
发帖
与我相关
我的任务
分享
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'mypt.service.studentService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup="", name="", description="", authenticationType=CONTAINER, type=java.lang.Object.class, mappedName="")}
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'mypt.service.studentService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup="", name="", description="", authenticationType=CONTAINER, type=java.lang.Object.class, mappedName="")}
如果 mypt.service.studentService 是接口类的话,应该是对应的实现类没有找到,楼主查一下配置信息吧,
如果是面向注解编程的话,需要配置相关的扫描路径。如果是xml配置文件的话,看看是不是漏掉的实现类的配置信息。
studentService 首字母没有大写,不符合命名规范。
studentService这个鬼你注入了没?前期不会玩的时候,能不用Resource就别用Resource