0

I am working in Micro-Services environment and i have 3 different application A, B and C.

i am using Resilience4j with Circuit Breaker in Spring Boot Application. And i am using 'C' application which is containing Controller Advice and added .jar into 'B' dependency and also 'B' application .jar is also added into 'A' application dependencies.

I am producing one Resp services and send request to another here my Controller advice within 'C' application which is already added into 'B' application dependencies and same 'B' application dependencies are added into 'A' application.

my request goes from 'A' application to 'B'application i want to handle my own exception in 'B' application but I have already added my dependency of 'C' application into 'B' application but my Controller advice is still not working.

So please provide me best solution for my above queries.

nikhil2505
  • 61
  • 1
  • 8
  • I'm confused. You are talking about applications which are added as a jar to an other application? Do you mean by application a Spring Boot application? – Robert Winkler Feb 13 '20 at 07:53
  • yes, but other application containing a controller advice and this application can handle common exception for all microservices – nikhil2505 Feb 13 '20 at 12:12
  • yes, but other application containing a controller advice and this application can handle common exception for all micro-services means i want to make 'C' application as a common for all other micro-services which is added into other spring boot applications and this 'C' application will handle custom exception which is coming from other micro-services. – nikhil2505 Feb 13 '20 at 12:18
  • To me it sounds like a Spring Boot related question and not Resilience4j. What exactly is your problem? Do you want to handle a CallNotPermittedException and return a certain error message to your clients? Is the CallNotPermittedException not thrown by your Controllers? – Robert Winkler Feb 14 '20 at 06:50
  • Hi Robert, Exactly i was finding solution of all questions which you have already mentioned. Yes, my Controller is not throwing CallNotPermittedException because my controller advice is already added as a .jar dependency into my parent application. So please give me appropriate solution for that. – nikhil2505 Feb 17 '20 at 09:14
  • I can't really answer your question without reproducing your issue. – Robert Winkler Feb 25 '20 at 07:57

0 Answers0