I'm new to the Spring Framework, and as a sign, I want to keep my MVC web parts as simple as possible, so I use annotation functions to work with Spring. I used to use:
int value = Integer.valueOf(request.getParameter("numberValue"))
output values ββfrom parameters - explicitly convert the string returned by getParameter() .
Useful, I noticed that when I use Spring terminology:
@RequestParameter("numberValue") int numVal
conversion is processed automatically. This is good, but the black box is for me. I tried to look at the questions here or in the Spring documentation, but all this information is about custom conversions (like a converter) for objects or formatting problems. All I want to know is how, by default, Spring handles primitive type conversions for @RequestParam .
source share