栏目分类:
子分类:
返回
终身学习网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
终身学习网 > IT > 软件开发 > 后端开发 > Java

找不到bean

Java 更新时间:发布时间: 百科书网 趣学号

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注解,启动成功,

转载请注明:文章转载自 www.051e.com
本文地址:http://www.051e.com/it/959705.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 ©2023-2025 051e.com

ICP备案号:京ICP备12030808号