springcloud启动报错Failed to initialize DiscoveryClient

来源:互联网 发布:淘宝客如何建站 编辑:程序博客网 时间:2024/06/07 08:40
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>
阅读全文
2 0
原创粉丝点击