Is RestTemplate thread safe?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is a Spring RestTemplate thread-safe? That is Is a RestTemplate a Strategy object that multiple connections can safely share. or Is a RestTemplate a connection object (like a data-base connection), which can not be shared while in use, and requires creation afresh, or pooling, for each connection. 回答1: RestTemplate is thread safe (emphasis added): Conceptually, it is very similar to the JdbcTemplate , JmsTemplate , and the various other templates found in the Spring Framework and other portfolio projects. This means, for instance, that the