概述
SpringCloud启动报错Failed to initialize DiscoveryClient
- 1. 报错
- 2. 解决办法
- 参考
1. 报错
Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class
Failed to initialize DiscoveryClient
Caused by: java.lang.RuntimeException: Cannot create Jersey client
Caused by: java.lang.NoClassDefFoundError: javax/ws/rs/ext/MessageBodyReader
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean ‘eurekaAutoServiceRegistration’; nested exception is java.lang.NullPointerException
2021-03-09 12:40:17.218 - Using XML decoding codec XStreamXml
2021-03-09 12:40:17.317 - error getting CloudEurekaClient
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration R e f r e s h a b l e E u r e k a C l i e n t C o n f i g u r a t i o n . c l a s s ] : B e a n i n s t a n t i a t i o n v i a f a c t o r y m e t h o d f a i l e d ; n e s t e d e x c e p t i o n i s o r g . s p r i n g f r a m e w o r k . b e a n s . B e a n I n s t a n t i a t i o n E x c e p t i o n : F a i l e d t o i n s t a n t i a t e [ c o m . n e t f l i x . d i s c o v e r y . E u r e k a C l i e n t ] : F a c t o r y m e t h o d ′ e u r e k a C l i e n t ′ t h r e w e x c e p t i o n ; n e s t e d e x c e p t i o n i s j a v a . l a n g . R u n t i m e E x c e p t i o n : F a i l e d t o i n i t i a l i z e D i s c o v e r y C l i e n t ! a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . C o n s t r u c t o r R e s o l v e r . i n s t a n t i a t e ( C o n s t r u c t o r R e s o l v e r . j a v a : 656 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . C o n s t r u c t o r R e s o l v e r . i n s t a n t i a t e U s i n g F a c t o r y M e t h o d ( C o n s t r u c t o r R e s o l v e r . j a v a : 636 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . i n s t a n t i a t e U s i n g F a c t o r y M e t h o d ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 1338 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . c r e a t e B e a n I n s t a n c e ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 1177 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . d o C r e a t e B e a n ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 557 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . c r e a t e B e a n ( A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . j a v a : 517 ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . l a m b d a 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! at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda RefreshableEurekaClientConfiguration.class]:Beaninstantiationviafactorymethodfailed;nestedexceptionisorg.springframework.beans.BeanInstantiationException:Failedtoinstantiate[com.netflix.discovery.EurekaClient]:Factorymethod′eurekaClient′threwexception;nestedexceptionisjava.lang.RuntimeException:FailedtoinitializeDiscoveryClient!atorg.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)atorg.springframework.beans.factory.support.AbstractBeanFactory.lambdadoGetBean 1 ( A b s t r a c t B e a n F a c t o r y . j a v a : 359 ) a t o r g . s p r i n g f r a m e w o r k . c l o u d . c o n t e x t . s c o p e . G e n e r i c S c o p e 1(AbstractBeanFactory.java:359) at org.springframework.cloud.context.scope.GenericScope 1(AbstractBeanFactory.java:359)atorg.springframework.cloud.context.scope.GenericScopeBeanLifecycleWrapper.getBean(GenericScope.java:389)
at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:186)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:356)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35)
at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getTargetObject(EurekaRegistration.java:129)
at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getEurekaClient(EurekaRegistration.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)
at org.springframework.cloud.context.scope.GenericScope L o c k e d S c o p e d P r o x y F a c t o r y B e a n . i n v o k e ( G e n e r i c S c o p e . j a v a : 499 ) a t o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . R e f l e c t i v e M e t h o d I n v o c a t i o n . p r o c e e d ( R e f l e c t i v e M e t h o d I n v o c a t i o n . j a v a : 186 ) a t o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . C g l i b A o p P r o x y LockedScopedProxyFactoryBean.invoke(GenericScope.java:499) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy LockedScopedProxyFactoryBean.invoke(GenericScope.java:499)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)atorg.springframework.aop.framework.CglibAopProxyCglibMethodInvocation.proceed(CglibAopProxy.java:747)
at org.springframework.aop.framework.CglibAopProxy D y n a m i c A d v i s e d I n t e r c e p t o r . i n t e r c e p t ( C g l i b A o p P r o x y . j a v a : 689 ) a t o r g . s p r i n g f r a m e w o r k . c l o u d . n e t f l i x . e u r e k a . s e r v i c e r e g i s t r y . E u r e k a R e g i s t r a t i o n DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689) at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)atorg.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB$e6eb5f5e.getEurekaClient()
at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.maybeInitializeClient(EurekaServiceRegistry.java:57)
at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.register(EurekaServiceRegistry.java:38)
at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration.start(EurekaAutoServiceRegistration.java:83)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
at org.springframework.context.support.DefaultLifecycleProcessor.access 200 ( D e f a u l t L i f e c y c l e P r o c e s s o r . j a v a : 53 ) a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . D e f a u l t L i f e c y c l e P r o c e s s o r 200(DefaultLifecycleProcessor.java:53) at org.springframework.context.support.DefaultLifecycleProcessor 200(DefaultLifecycleProcessor.java:53)atorg.springframework.context.support.DefaultLifecycleProcessorLifecycleGroup.start(DefaultLifecycleProcessor.java:360)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:894)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at com.navinfo.ark.App.main(App.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
Caused by: 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!
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
… 47 common frames omitted
Caused by: java.lang.RuntimeException: Failed to initialize DiscoveryClient!
at com.netflix.discovery.DiscoveryClient.(DiscoveryClient.java:430)
at com.netflix.discovery.DiscoveryClient.(DiscoveryClient.java:279)
at com.netflix.discovery.DiscoveryClient.(DiscoveryClient.java:275)
at org.springframework.cloud.netflix.eureka.CloudEurekaClient.(CloudEurekaClient.java:67)
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration R e f r e s h a b l e E u r e k a C l i e n t C o n f i g u r a t i o n . e u r e k a C l i e n t ( E u r e k a C l i e n t A u t o C o n f i g u r a t i o n . j a v a : 324 ) a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d ) a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( U n k n o w n S o u r c e ) a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( U n k n o w n S o u r c e ) a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( U n k n o w n S o u r c e ) a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . S i m p l e I n s t a n t i a t i o n S t r a t e g y . i n s t a n t i a t e ( S i m p l e I n s t a n t i a t i o n S t r a t e g y . j a v a : 154 ) . . . 48 c o m m o n f r a m e s o m i t t e d C a u s e d b y : j a v a . l a n g . R u n t i m e E x c e p t i o n : C a n n o t c r e a t e J e r s e y c l i e n t a t c o m . n e t f l i x . d i s c o v e r y . s h a r e d . t r a n s p o r t . j e r s e y . E u r e k a J e r s e y C l i e n t I m p l RefreshableEurekaClientConfiguration.eurekaClient(EurekaClientAutoConfiguration.java:324) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 48 common frames omitted Caused by: java.lang.RuntimeException: Cannot create Jersey client at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl RefreshableEurekaClientConfiguration.eurekaClient(EurekaClientAutoConfiguration.java:324)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)...48commonframesomittedCausedby:java.lang.RuntimeException:CannotcreateJerseyclientatcom.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImplEurekaJerseyClientBuilder.build(EurekaJerseyClientImpl.java:187)
at com.netflix.discovery.shared.transport.jersey.JerseyEurekaHttpClientFactory J e r s e y E u r e k a H t t p C l i e n t F a c t o r y B u i l d e r . b u i l d L e g a c y ( J e r s e y E u r e k a H t t p C l i e n t F a c t o r y . j a v a : 230 ) a t c o m . n e t f l i x . d i s c o v e r y . s h a r e d . t r a n s p o r t . j e r s e y . J e r s e y E u r e k a H t t p C l i e n t F a c t o r y JerseyEurekaHttpClientFactoryBuilder.buildLegacy(JerseyEurekaHttpClientFactory.java:230) at com.netflix.discovery.shared.transport.jersey.JerseyEurekaHttpClientFactory JerseyEurekaHttpClientFactoryBuilder.buildLegacy(JerseyEurekaHttpClientFactory.java:230)atcom.netflix.discovery.shared.transport.jersey.JerseyEurekaHttpClientFactoryJerseyEurekaHttpClientFactoryBuilder.build(JerseyEurekaHttpClientFactory.java:204)
at com.netflix.discovery.shared.transport.jersey.JerseyEurekaHttpClientFactory.create(JerseyEurekaHttpClientFactory.java:161)
at com.netflix.discovery.shared.transport.jersey.Jersey1TransportClientFactories.newTransportClientFactory(Jersey1TransportClientFactories.java:59)
at com.netflix.discovery.DiscoveryClient.scheduleServerEndpointTask(DiscoveryClient.java:504)
at com.netflix.discovery.DiscoveryClient.(DiscoveryClient.java:417)
… 57 common frames omitted
Caused by: java.lang.RuntimeException: Cannot create Jersey client
at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl.(EurekaJerseyClientImpl.java:60)
at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl$EurekaJerseyClientBuilder.build(EurekaJerseyClientImpl.java:185)
… 63 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/ws/rs/ext/MessageBodyReader
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader 1. r u n ( U n k n o w n S o u r c e ) a t j a v a . s e c u r i t y . A c c e s s C o n t r o l l e r . d o P r i v i l e g e d ( N a t i v e M e t h o d ) a t j a v a . n e t . U R L C l a s s L o a d e r . f i n d C l a s s ( U n k n o w n S o u r c e ) a t j a v a . l a n g . C l a s s L o a d e r . l o a d C l a s s ( U n k n o w n S o u r c e ) a t j a v a . l a n g . C l a s s L o a d e r . l o a d C l a s s ( U n k n o w n S o u r c e ) a t s u n . m i s c . L a u n c h e r 1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher 1.run(UnknownSource)atjava.security.AccessController.doPrivileged(NativeMethod)atjava.net.URLClassLoader.findClass(UnknownSource)atjava.lang.ClassLoader.loadClass(UnknownSource)atjava.lang.ClassLoader.loadClass(UnknownSource)atsun.misc.LauncherAppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.jersey.core.reflection.ReflectionHelper$3.run(ReflectionHelper.java:284)
at com.sun.jersey.core.reflection.ReflectionHelper 3. r u n ( R e f l e c t i o n H e l p e r . j a v a : 279 ) a t j a v a . s e c u r i t y . A c c e s s C o n t r o l l e r . d o P r i v i l e g e d ( N a t i v e M e t h o d ) a t c o m . s u n . j e r s e y . s p i . s e r v i c e . S e r v i c e F i n d e r 3.run(ReflectionHelper.java:279) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jersey.spi.service.ServiceFinder 3.run(ReflectionHelper.java:279)atjava.security.AccessController.doPrivileged(NativeMethod)atcom.sun.jersey.spi.service.ServiceFinderAbstractLazyIterator.hasNext(ServiceFinder.java:697)
at com.sun.jersey.spi.service.ServiceFinder.toClassArray(ServiceFinder.java:549)
at com.sun.jersey.core.spi.component.ProviderServices.getServiceClasses(ProviderServices.java:345)
at com.sun.jersey.core.spi.component.ProviderServices.getServiceClasses(ProviderServices.java:338)
at com.sun.jersey.core.spi.component.ProviderServices.getServices(ProviderServices.java:162)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:176)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:162)
at com.sun.jersey.api.client.Client.init(Client.java:343)
at com.sun.jersey.api.client.Client.access$000(Client.java:119)
at com.sun.jersey.api.client.Client$1.f(Client.java:192)
at com.sun.jersey.api.client.Client$1.f(Client.java:188)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
at com.sun.jersey.api.client.Client.(Client.java:188)
at com.sun.jersey.client.apache4.ApacheHttpClient4.(ApacheHttpClient4.java:151)
at com.sun.jersey.client.apache4.ApacheHttpClient4.(ApacheHttpClient4.java:137)
at com.sun.jersey.client.apache4.ApacheHttpClient4.create(ApacheHttpClient4.java:181)
at com.netflix.discovery.shared.transport.jersey.EurekaJerseyClientImpl.(EurekaJerseyClientImpl.java:52)
… 64 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.ext.MessageBodyReader
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 101 common frames omitted
2021-03-09 12:40:17.319 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean ‘eurekaAutoServiceRegistration’; nested exception is java.lang.NullPointerException
2021-03-09 12:40:17.331 -
2. 解决办法
- 解决: 排除Jersey,用SpringMVC Rest方式,并添加jersey-server依赖
<!--eureka客户端 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.0.2.RELEASE</version>
<!-- 排除Jersey,用SpringMVC Rest方式-->
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-apache-client4</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 添加jersey-server依赖 -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.25.1</version>
</dependency>
参考
- https://my.oschina.net/wuxinshui/blog/1834268?tdsourcetag=s_pcqq_aiomsg
- https://blog.csdn.net/chengzi12345/article/details/105840717
- https://blog.csdn.net/badyting/article/details/72822660
最后
以上就是健康魔镜为你收集整理的SpringCloud启动报错Failed to initialize DiscoveryClient的全部内容,希望文章能够帮你解决SpringCloud启动报错Failed to initialize DiscoveryClient所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复