I was wondering why Spring @PathVariable
in the Controller is removing the spaces at the end of a word. for example my ajax is sending XYZ123
. When this message is bind to a String with @PathVariable
the ending space is removed by Spring. While it is send to the server as the correct String with the space.
The URL is send to the controller like
http://mydomain.com/user/XYZ123%20
and still spring is removing the space.
Is this just a bug, or is there a reason for it?