My project is organized in layers likeConfigurationControllerServiceRepositoryDomainOur REST Controller is in the Controller layer. We need to connect to another API via REST calls and I'm not sure if I should make a new Controller or do it in the Service layer.I'm going to implement the REST calls with Spring's RestTemplate.The way our API will be used is like this: REST call is made that goes through our REST endpoint. Our REST endpoint will call the third party API (either by calling another controller method or a service method).We will then do a conversion between our format and the third party formatThen we will return the JSON of our format back to the client
In a REST service project, where should we put code that calls a third party REST API?
java;design;rest;web