I have a project based on spring boot, using microseroservis, eureka as services registration and zuul as proxy server. I have two services that one dependes thah other. Each services has own rest controller, service, serviceimpl and repository, like the traditional spring-boot application. The service1 depends of service2, the question is: How do I manage this dependency?. I have two approach:
- Inject service2 interface on service1
- Using ribbon load balancer and create a client for each service and use de client to consume the service2.
Which of two approach is the best way for do it? What are the pros and cons of each?