I see that Spring Web 5.1.0.RC3 changed the DefaultUriBuilderFactory default EncodingMode from URI_COMPONENT to TEMPLATE_AND_VALUES.
With this change, I found that when I call, for example, on a UriBuilder instance from the DefaultUriBuilderFactory:
uriBuilder.queryParam( "displayValue", "31.135, -108.06222222222222" ).build()
the resulting URI contains the raw space from the value argument:
http://127.0.0.1:8573/v1/own/position/probe?displayValue=31.135, -108.06222222222222
and thus my WebClient.get() call fails with an IllegalArgumentException: Illegal character in query.
In version 5.0.9.RELEASE with the default mode URI_COMPONENT, the space was encoded to a %20, and thus the WebClient HTTP GET succeeded.
Is this the expected behavior in mode TEMPLATE_AND_VALUES, and thus if I keep my DefaultUriBuilderFactory in that mode should I pre-encode the Strings before passing them to method queryParam( String, Object...)?
I find it hard to tell if this is the expected behavior from the javadoc on TEMPLATE_AND_VALUES, because it does not mention encoding the "component values," as opposed to the javadoc on URI_COMPONENT which does mention it.