如下是错误提示:
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 'com.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=class com.service.impl.StudentServiceImpl, mappedName=)}
提示说我没有创建对应的bean导致注入失败,可是在StudentServiceImpl上我有添加注解@Service
如下是在控制器中调用StudentServiceImpl的方法时的错误提示:
网上找了很多方法也没弄好,希望有大佬给解答一下,先谢为敬!