In HierarchicalUriComponents.java , expandQueryParams method want the params expand to uri, but for this method is not.

you can find this issue by use RestTemplate.exchange(String url, HttpMethod method, @Nullable HttpEntity<?> requestEntity, Class responseType, Map uriVariables) method. Through this method, we can find stack trace calls HierarchicalUriComponents.expandQueryParams method,。 During this calling process,no assignment to the queryParams property in this class anywhere, so queryParams size is zero, alwalys can not append variables.

Comment From: bclozel

Instead of explaining where you think the problem is in the codebase please share a minimal sample that reproduces the problem and explain the expected behavior.