Reputation: 119
The scenario I have is as follows:
When I Launch the APP2, It launches fine. But when I test using an http request I get a NoClassDefFoundError for some classes in LIB.
Is there an approach that would be a good implementation for this scenario.
Code flow: Controller(APP2)->Service(APP@)->Service(APP1)->Business logic classes(LIB)
Upvotes: 2
Views: 699
Reputation: 209
A better design :-
-OR-
Run both the services independently and add a http call between the 2 services.
Usually when you want to have libs in a micro service architecture, they are supposed to be plain Java Classes so that they can be consumed anywhere.
One reason the current setup might not be working is the services in APP1 might not be getting the required dependencies injected as it is supposed to.
Upvotes: 1