什么是RestTemplate Synchronous client to perform HTTP requests, exposing a simple, template method API over underlying HTTP client libraries such as the JDK HttpURLConnection, Apache HttpComponents, and others. 这是RestTemplate源码里对其自身的解释,从类名来看把类想设计成一个标准的模
一.添加拦截器 public class HeaderRequestInterceptor implements ClientHttpRequestInterceptor { private final String headerName; private final String headerValue; public HeaderRequestInterceptor(String headerName, String headerValue) { this.headerName = head