ResponseEntity<String> ss = restTemplate.postForEntity("http://smap-toll/smap/toll/test?ak={1}",new HttpEntity<String>(s), String.class,accessKey);
The first parameter is url ak={1} is a parameter, and {1} is a placeholder, corresponding to the order of the variable parameters that follow.
For example, if I am a parameter here, then the accessKey will be passed to this placeholder.
However, HttpEntity<String>(s) is the content in the body of the http request request. String.class is the type returned by url.