Error creating bean with name 'scopedTarget.eurekaClient' defined in class path resource

org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.eurekaClient' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method 'eurekaClient' threw exception; nested exception is java.lang.RuntimeException: Failed to initialize DiscoveryClient!

springcloud启动的时候报这个错误。

解决增加jersey jar

<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-server</artifactId>
    <version>2.25.1</version>
</dependency>

spring boot是1.3.0或者是1.5.13这两个版本
--------------------- 
转载原文:https://blog.csdn.net/badyting/article/details/72822660 

猜你喜欢

转载自blog.csdn.net/onlyoneggp/article/details/88363165