Today write feign of the demo when stepping on a big pit, feel spring-cloud everywhere is pit, these pits common reason is dependent on the version of the package problem!!!
It's really mad.
Eureka's configuration was a long time ago.
------------------------------------------------------------
The first is to add a no error, but run the time to throw a Nosuchemthod exception
Nosuch your sister.
Check the version of the problem, the result of a blind (and no recording process), resulting in the result is Servicefeignapplication.java inside the error
The reason for the error is that the @enablefeignclients annotation cannot be used and the corresponding package cannot be found
Really stuck for a long time! Because my pom is full of bread!!!!
Finally found the reason, or version of the problem: I am using Springboot version 2.0.3,springcloud version of Finchley.release
Workaround: Add the Spring-cloud-starter-openfeign dependency package to the Pom file
And then we can.
Damn it, it's blowing.
But still super like to solve the problem, do not feel bored, but feel very stimulating, hehe
The pit of Springcloud's feign