0

I configured springboot application with

@EnableFeignClients
@SpringCloudApplication

and get error

java.lang.NoClassDefFoundError: com/netflix/hystrix/contrib/javanica/aop/aspectj/HystrixCommandAspect

But if I change annotation to

@EnableFeignClients
@SpringBootApplication
@EnableDiscoveryClient

which means removed annotation @EnableCircuitBreaker

the server start is successful. Why is @EnableFeignClients in conflict with @EnableCircuitBreaker ? Or how has the error happened?

SeanJ
  • 1,203
  • 2
  • 19
  • 39
zhuochen shen
  • 1,673
  • 4
  • 16
  • 24
  • What version are you using? Older versions of spring-cloud-netflix using feign required hystrix. Adding spring-cloud-starter-hystrix probably will fix your issue, or upgrade to Dalston.SR3. – spencergibb Sep 25 '17 at 17:00
  • @spencergibb spring-cloud version is Dalston.SR3 with springboot 1.5.7.RELEASE – zhuochen shen Sep 26 '17 at 03:02
  • Without Hystrix, the spring cloud application annotation won't work, and you'll get that error – spencergibb Sep 26 '17 at 03:45

0 Answers0