java.lang.IllegalStateException: No instances available for SPRINGCLOUDTEST-PROVIDER-DEPT解决方法
-
Estimated encountered similar problems this picture below, are the SpringCloud read online tutorials to integrate a custom Ribbon load balancing algorithms class.
-
Solution:
The following is the original startup class (consumer port 80)
to@RibbonClient
annotationname
attributes lowercase formname=myspringcloudtest-provider-dept
(if it is in accordance with some tutorials online, you may need to be changedspringcloudtest-provider-dept
, according to their own in the producer micro-services ofapplication.xml
configurationspring.application.name
properties to modify)
modified as shown below: then restart