Hystrix: Embedding Hystrix in existing Spring MVC project (No Spring Boot)

Created on 27 May 2015  路  6Comments  路  Source: Netflix/Hystrix

Just to follow up from Google Group : https://groups.google.com/d/msg/hystrixoss/r_V1WjM37_o/YgaGQdbpCacJ

Issue : I am unable to use @HystrixCommand annotations, as it uses spring boot. I already have spring mvc app, which doesn't use spring boot. So I created my own annoations based on javanica annotations api to do work around.

What is write way to use hystrix in spring mvc env? @dmgcodevil

Back Ground :

I have an existing Spring MVC web app. My application communicate to NoSql Db and In case of Fallback I have MYSQL.

Here is What, that I am doing

  1. My Controller, Call my service layer : This service layer is basically my HystrixCommandService , which will call the actual Nosql or DB service.
  2. Also I have to change some property on runtime, may be due to load, failure etc. Please have a look at code in the above link @ hystrixoss google group.

Most helpful comment

For future reference, this was resolved on StackOverflow via @EnableAspectJAutoProxy.

All 6 comments

@HystrixCommand is a pure hystrix-javanica annotation and has nothing to do with Spring-Boot. See for it's usage here: https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-javanica

I'm using Javanica in my non-Spring-Boot app without problems

Please re-open this issue if you have further questions, @pranavtiwary

@eeichinger I'm trying to use the same thing(Hystrix without spring boot in SPring MVC app).However it's not working. Here is the code sniipet link:
http://stackoverflow.com/questions/35034912/why-spring-mvc-4-and-hystrix-integration-not-working-without-spring-boot-api
Can you please help me with this????

For future reference, this was resolved on StackOverflow via @EnableAspectJAutoProxy.

I'm done with the hystrix implementation in Spring mvc. But the hystrix stream is not generating getting "Not found exception" while accessing the localhost:8080/hystrix.stream. Please help regarding this

@HystrixCommand is a pure hystrix-javanica annotation and has nothing to do with Spring-Boot. See for it's usage here: https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-javanica

I'm using Javanica in my non-Spring-Boot app without problems

Hi
I am trying to use Hystrix annotation for Non Spring project, As We have existing application with ODATA, is there any example or how to scan the hystrix command.

Was this page helpful?
0 / 5 - 0 ratings