嗨,我一直在搜索这个问题,但无法得到完美的答案。我有以下代码片段
SparkResponse<CommonEvents> response = restTemplate.exchange(url, HttpMethod.POST, entity, new ParameterizedTypeReference<SparkResponse<CommonEvents>>() { }).getBody();
如何在resttemplate中实现批处理?
我尝试使用 ResponseExtractor 但它对我不起作用。
需要批处理,因为有时数据量太高并且我遇到堆内存异常。如果可能的话请告诉我。
最佳答案
不知道这是否有帮助。但我想,你可以尝试一下。 https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/AsyncRestTemplate.html
关于java - 如何在Spring RestTemplate中实现批处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59455497/