OpenFeign服务调用遇见的错误
1、错误信息
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-09-14 23:56:46.438 ERROR 16188 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field paymentService in com.atldy.springcloud.controller.OrderHystrixController required a bean of type 'com.atldy.springcloud.service.PaymentService' 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 'com.atldy.springcloud.service.PaymentService' in your configuration.
2、原因
主启动类忘了加@EnableFeignClients注解