GET ResponseEntity<XimoApiResult<TokenResult>> responseEntity = restTemplate.exchange(url, HttpMethod.GET, null, reference, baseRequest.getAppId(), baseRequest.getAppSecret());
执行进入execute方法后,
public <T> T execute(String url, HttpMethod method, @Nullable RequestCallback requestCallback, @Nullable ResponseExtractor<T> responseExtractor, Object... uriVariables) throws RestClientException { URI expanded = this.getUriTemplateHandler().expand(url, uriVariables); return this.doExecute(expanded, method, requestCallback, responseExtractor); }
执行完URI expanded = this.getUriTemplateHandler().expand(url, uriVariables); url参数没有被替换
如:https://xxxx.com/app/extapi/getAccessToken?appId={}
此时 需要注意 应该将url改为:
https://xxxx.com/app/extapi/getAccessToken?appId={appId}