报错详情:
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-
2022-08-03 09:41:13.156|ERROR|||||||||||main|LoggingFailureAnalysisReporter|
-
***************************
-
APPLICATION FAILED TO START
-
***************************
-
Description:
-
Field UserRoleRefv01Service in com.xxx.xxxx.xxxxx.xxxxxx.controller.v01.controller.xxxxxController required a bean of type 'xxx.xxxx.xxxx.xxxxxx.xxxxxx.service.portal.v01.service.xxxxx' that could not be found.
-
The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)
-
Action:
-
Consider defining a bean of type 'xxx.xxxx.xxxx.xxxxxx.xxxxxx.service.portal.v01.service.xxxxx' in your configuration.
NoSuchBeanDefinitionException: No qualifying bean of type 'xxx.xxxxx.xxxx.service.portal.v01.service.XxxxXxx' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
解决方案
在service实现类(xxxxxxImpl.java)里添加
@Service('xxxxxx')
报错详情:
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-
2022-08-03 09:41:13.156|ERROR|||||||||||main|LoggingFailureAnalysisReporter|
-
***************************
-
APPLICATION FAILED TO START
-
***************************
-
Description:
-
Field UserRoleRefv01Service in com.xxx.xxxx.xxxxx.xxxxxx.controller.v01.controller.xxxxxController required a bean of type 'xxx.xxxx.xxxx.xxxxxx.xxxxxx.service.portal.v01.service.xxxxx' that could not be found.
-
The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)
-
Action:
-
Consider defining a bean of type 'xxx.xxxx.xxxx.xxxxxx.xxxxxx.service.portal.v01.service.xxxxx' in your configuration.
NoSuchBeanDefinitionException: No qualifying bean of type 'xxx.xxxxx.xxxx.service.portal.v01.service.XxxxXxx' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
解决方案
在service实现类(xxxxxxImpl.java)里添加
@Service('xxxxxx')