If you want to implement a layered API design for example, you may have one API layer that represents the application layer. And I assume that the application layer is represented by an endpoint and uri. Let’s say we implement a Spring MVC Boot based controller, within that controller we may make a httpclient rest call or use SpringRest Template invocation to another layer, say the infrastructure api layer.
My question centers around the chaining and calling different apis, is spring rest template or httpclient directly used? Or Something else more sophisticated? I ask , because it seems cumbersome replicating a lot of domain objects. Can you share model/domain objects between different layers?