In our spring boot application, we are calling the external API for some purpose, it is returning around 20mb JSON data as the response. After receiving the response, using ObjectMapper we are mapping the response to a POJO.
We are using RestTemplate to call the API and receive the response.
What are the best practices to handle large response data without getting memory issues in Spring boot application?
Thanks