
2022-06-06 10:29:54.901 WARN 72676 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.qfedu.shiro2.service.UserServiceImpl' 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 java.lang.Object, mappedName=)}
2022-06-06 10:29:54.901 INFO 72676 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-06-06 10:29:54.911 INFO 72676 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-06-06 10:29:54.961 ERROR 72676 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'com.qfedu.shiro2.service.UserServiceImpl' that could not be found.
Action:
Consider defining a bean of type 'com.qfedu.shiro2.service.UserServiceImpl' in your configuration.
解决方案:添加@Service注解,启动成功,