I hope cross posting only applies to different section in the same site, as I have asked this already here:
http://forum.spring.io/forum/spring-projects/container/738867-rest-request-mapping-parameter-type-differentiation
I have a controller that has two request mappings, one that takes a long and the other a
string.
The request mapping path is identical, differentiated only by the type of the path variable.
ie:
/{Long}
vs
/{String}
On some systems this works. I fact it made it through QA without a hitch. Now, we're seeing problems where all requests to this URL are dispatched to the Long variant and this throw on the string to long conversion.
On some systems I get:
curl -s -3kL qa4:8080/content-manager/api/category/Entertainment
....
Error 500 Failed to convert value of type 'java.lang.String' to required type 'java.lang.Long'; nested exception is org.springframework.core.convert.ConversionFailedException: Unable to convert value "Entertainment" from type 'ja
va.lang.String' to type 'java.lang.Long'; nested exception is java.lang.NumberFormatException: For input string: "Entertainment"
....
whereas others running the exact same build interpret the "Entertainment" string as a string and do not force it into the Long method.
My primary question is 'why is the above request being dispatched to the Long variant rather than the String one?'
My other question is 'why would this behavior differ between systems?'
There is zero difference between the installed wars and jetty config.