Hello,
Spring version - 5.2.5
When I try to use UriComponentsBuilder
with 2 query params the parameter separator(ampersand &) it's solved to unicode encoding.
something like:
http://my.url.com/info/xpto?param1=123u0026param2=123
should be:
http://my.url.com/info?param1=123¶m2=123
So the problem is the u0026
.
Code:
UriComponentsBuilder.fromHttpUrl("http://my.url.com")
.path("/info")
.query("param1={p1}")
.query("param2={p2}")
.buildAndExpand(123, 123).encode().toUri()
I also tried to use encode before buildAndExpand, but gives the same error.
It's a expected behavior ? or some config is missing ?