I\'m new to the Spring Framework, and as a symptom, I want to keep my adoption of its Web MVC portions as simple as possible, so I\'m using the annotation functions to work with
I've noticed that when I use Spring's terminology: @RequestParameter("numberValue") int numVal the conversion is handled automatically.
Here you are looking for Type Conversion
As per spring documentation given on this link
String-based values extracted from the request including request parameters, path variables, request headers, and cookie values may need to be converted to the target type of the method parameter or field (e.g., binding a request parameter to a field in an @ModelAttribute parameter) they’re bound to. If the target type is not String, Spring automatically converts to the appropriate type. All simple types such as int, long, Date, etc. are supported.