SpringCloud启动报错Failed to initialize DiscoveryClient

2023-10-30

SpringCloud启动报错Failed to initialize DiscoveryClient

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]:FactorymethodeurekaClientthrewexception;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>

参考

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

SpringCloud启动报错Failed to initialize DiscoveryClient 的相关文章

随机推荐

  • Netty中的那些坑

    转载自 http www cnblogs com rainy shurun p 5213086 html Netty中的那些坑 上篇 最近开发了一个纯异步的redis客户端 算是比较深入的使用了一把netty 在使用过程中一边优化 一边解决
  • 基于深度学习的图像去雾算法

    文章目录 前言 Preface 一 GFN dehazing 二 Dehaze cGAN 三 Cycle Dehaze 四 定性分析算法性能 Qualitative analysis of algorithm performance GFN
  • 计网第四章(网络层)(八)(最短路径优先协议OSPF)

    在第七节 计网第四章 网络层 七 永无魇足的博客 CSDN博客 我们总结了路由信息协议RIP 在最后我们提到了RIP协议有坏消息传的慢的问题 这是距离向量算法的本质决定的 所以这种问题无法彻底避免 既然基于距离向量无法彻底避免产生路由环路
  • numpy.argsort详解

    numpy argsort 用例 numpy argsort a axis 1 kind None order None 功能 返回数组排序后的元素索引值 根据kind指定的算法对数组沿着axis轴进行排序 其返回值的形状和a一致 返回值内
  • 干货 :深度学习必须掌握的 13 种概率分布

    来源 深度学习前沿 本文约1400字 建议阅读5分钟 这里有一份最常见的基本概率分布教程 大多数和使用 python 库进行深度学习有关 作为机器学习从业者 你需要知道概率分布相关的知识 这里有一份最常见的基本概率分布教程 大多数和使用 p
  • ZooKeeper 节点类型

    ZooKeeper 节点是有生命周期的 这取决于节点的类型 在 ZooKeeper 中 节点类型可以分为持久节点 PERSISTENT 临时节点 EPHEMERAL 以及时序节点 SEQUENTIAL 具体在节点创建过程中 一般是组合使用
  • 在mysql中删除数据后,添加数据,id值依然从删除的位置开始增加,问题详解。

    id name age email isActive 1 王老师 32 wangwc 163 com 1 2 王老师 32 wangwc 163 com 1 3 隔壁老王
  • Windows Server 2008 R2修改远程桌面连接数

    计算机 属性 远程设置 勾选 允许运行任意版本远程桌面的计算机连接 较不安全 第一步 开启远程桌面 计算机 属性 远程设置 勾选 允许运行任意版本远程桌面的计算机连接 较不安全 第二步 设置远程桌面连接最大数量 控制面板 gt 管理工具 g
  • 2020.11.12 算法练习

    2020 11 12 算法练习 题目描述 示例 算法思路 答案 运行示例 出现的问题 题目描述 给定一个非负整数数组 A A 中一半整数是奇数 一半整数是偶数 对数组进行排序 以便当 A i 为奇数时 i 也是奇数 当 A i 为偶数时 i
  • STM32简单呼吸灯的制作

    物联网应用技术2班 李俊运 20210320018 目的 实现呼吸灯 逐渐亮 逐渐灭 准备工作 1 首先我们需要准备32的最小系统板或者开发板 2 准备一个LED灯 如果使用板子上的灯来实现则不需要 下面我是使用最小系统板上的LED灯来实现
  • Datalore 安装使用教程

    发现一个jetbrain出的好东西 使用体验完爆jupyter notebook以及jupyter lab的软件 就是安装有点复杂 官网写得有点不清楚 这里简单介绍一下 首先他只能在linux运行 其他环境暂时不支持 首先 去https w
  • vscode内网环境部署

    1 首先需要一台能连网的电脑把需要的插件拷贝到内网电脑 把vscode传到内网电脑 在安装时选择环境变量 装完之后重启 2 安装Remote SSH 去官网下载 除了下载Remote SSH之外 还需要下载两个插件 Extensions f
  • 宝塔安装nextcloud

    首先买服务器 域名 ssl证书 最好开个子域名 比如 wangpan 666 com类似的 百度搜索宝塔 安装 就这样 装好之后打开宝塔 第一次安装环境的时候用lnmp 也就是nginx 注意php用7 0及以上版本 注意php装好之后选择
  • 【ssh】pycharm链接远程服务器出现:Bad owner or permissions on C:\\Users\\用户名/.ssh/config

    一直以来是用的pycharm 最近改用了vscode登录 并配置了config文件实现了vscode自动连接远程服务器 但是回到pycharm发现terminal端口不管用了 电脑上的powershell也是链接不上远程服务器并报错Bad
  • Unity TileMap 2D 工具基础教程

    Unity TileMap 2D 工具基础教程 Unity TileMap 2D 工具基础教程 TileMap 工程创建 Sprite Editor 工具使用 TileMap 功能说明 TilePalette 调色板功能 Unity Til
  • 网站安全狗

    phpstudy安装yxcms server2012安装phpstudy和网站安全狗 创建一个网站 将文件解压到phpstudy根目录下 访问网站进入安装页面 安装成功 windows服务器安装网站安全狗 启动apache服务 进行安装 安
  • WaterView 自定义圆形水波进度

    这几天不是很忙 完成了工作 利用闲暇的时间来完成一下以前不会玩的自定义动画 自定义圆形水波进度 这个以前把我难死了 死活不会 都怪自己太菜了 那么现在来看看到底难不难 真正最简单的实现方法 先来了解下path类的基本方法 移动起点 move
  • 解读欧债危机-时寒冰

    读这本书 让我有种真的仿佛明白货币就是货币 不是所谓的钱 货币真的那样的不靠谱 应该读一读 货币战争 的 1 1931年 金融危机过后 美元才取代英镑 成为世界货币 海湾的石油全部使用美元作为结算货币 法国曾经挑战美元的权威 用美元换黄金
  • 2021年最新metasploitable3虚拟机安装教程---三分钟搞定

    网上很多教程又是packer又是vagrant的 瞎几把折腾几天也没搞定 一句命令 多处报错 而且安装起来服务器在国外以至于超级慢 超时就自己挂掉且前面安装的也没了 超级恶心 然后在官方github找到了最简洁的安装方法 1 下载ova文件
  • SpringCloud启动报错Failed to initialize DiscoveryClient

    SpringCloud启动报错Failed to initialize DiscoveryClient 1 报错 2 解决办法 参考 1 报错 Error creating bean with name scopedTarget eurek