Solution of spring cloud eurka registration error in Java


Error in registering in eurka when learning spring cloud:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-10-04 11:15:19.703 ERROR 34860 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
Field discoveryClient in cn.itcast.consumer.web.ConsumerController required a bean of type '' that could not be found.
The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)
Consider defining a bean of type '' in your configuration.

Error code:

private DiscoveryClient discoveryClient;

Error reason: the jar package was imported incorrectly

Correct code:

private DiscoveryClient discoveryClient;

This is the end of this article about the solution of Java spring cloud eurka registration errors. For more information about Java spring cloud eurka registration errors, please search the previous articles of developeppaer or continue to browse the relevant articles below. I hope you will support developeppaer in the future!

Recommended Today


Supervisor [note] Supervisor – H view supervisor command help Supervisorctl – H view supervisorctl command help Supervisorctl help view the action command of supervisorctl Supervisorctl help any action to view the use of this action 1. Introduction Supervisor is a process control system. Generally speaking, it can monitor your process. If the process exits abnormally, […]