Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ''

一笑奈何 提交于 2020-03-12 03:51:56

异常日志:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘lightShopServiceImpl’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type ‘com.xxx.uni.retail2.plus.client.enter.LightShopDecorationService’ 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=)}

解决方法:

属于bean注入问题,首先定位到LightShopDecorationService,然后检查接口是否添加@Service,且相应的接口有没有单独声明,上述问题是接口没有进行@HSFConsumer注册,添加后正常

异常说明:

由以下原因引起:org.springframework.beans.factory.BeanCreationException:创建名称为’lightShopServiceImpl’的bean时出错:注入资源依赖项失败; 嵌套的异常是org.springframework.beans.factory.NoSuchBeanDefinitionException:
没有可用的类型为’com.xxx.uni.retail2.plus.client.enter。** LightShopDecorationService **'的合格Bean:预计至少有1个有资格作为自动装配候选的Bean
依赖注释:{@ javax.annotation.Resource(shareable = true,lookup =,name =,description =,authenticationType = CONTAINER,type = class java.lang.Object,mappingName =)}

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!