I\'m attempting to use spring\'s UriComponentsBuilder to generate some urls for oauth interaction. The query parameters include such entities as callback urls and parameter
UriComponentsBuilder is encoding your URI in accordance with RFC 3986, with section 3.4 about the 'query' component of a URI being of particular note.
Within the 'query' component, the characters '/' and ':' are permitted, and do not need escaping.
To take the '/' character for example: the 'query' component (which is clearly delimited by unescaped '?' and (optionally) '#' characters), is not hierarchical and the '/' character has no special meaning. So it doesn't need encoding.