Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java.lang.NoClassDefFoundError:org/springframework/boot/Banner$模式使用Hystrix时_Java_Maven_Microservices_Hystrix - Fatal编程技术网

java.lang.NoClassDefFoundError:org/springframework/boot/Banner$模式使用Hystrix时

java.lang.NoClassDefFoundError:org/springframework/boot/Banner$模式使用Hystrix时,java,maven,microservices,hystrix,Java,Maven,Microservices,Hystrix,我正在尝试创建一个简单的Hystrix应用程序,我添加了maven依赖项,它抛出了一个下面的错误 Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/Banner$Mode at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(Boots

我正在尝试创建一个简单的Hystrix应用程序,我添加了maven依赖项,它抛出了一个下面的错误

    Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/Banner$Mode
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:162)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:102)
    at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:68)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
    at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:100)
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:59)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:285)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
    at com.hp.it.sadb.telepathy.Main.main(Main.java:80)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.Banner$Mode
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 11 more
下面是我的maven依赖项:

<dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-hystrix</artifactId>
   <version>1.4.6.RELEASE</version>
</dependency>

<dependency>
    <groupId>com.netflix.hystrix</groupId>
    <artifactId>hystrix-javanica</artifactId>
    <version>RELEASE</version>
</dependency>
<dependency>
    <groupId>com.netflix.hystrix</groupId>
    <artifactId>hystrix-core</artifactId>
    <version>RELEASE</version>
</dependency>
<dependency>
    <groupId>com.netflix.hystrix</groupId>
    <artifactId>hystrix-metrics-event-stream</artifactId>
    <version>RELEASE</version>
</dependency>

org.springframework.cloud
春云
1.4.6.1发布
com.netflix.hystrix
爪哇石首鱼
释放
com.netflix.hystrix
海斯特里克斯岩芯
释放
com.netflix.hystrix
hystrix度量事件流
释放
有人能告诉我,如何解决这个问题并创建一个简单的hystrix应用程序吗?


<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>

Please follow below link for Sample Hystix Application.

https://howtodoinjava.com/spring-cloud/spring-hystrix-circuit-breaker-tutorial/
org.springframework.cloud 春云 org.springframework.cloud spring cloud starter hystrix仪表板 请按照以下链接获取Hystix应用程序示例。 https://howtodoinjava.com/spring-cloud/spring-hystrix-circuit-breaker-tutorial/
这是否回答了您的问题?