Springmvc绑定参数出现的异常(springmvc argument type [java.lang.Integer] not available)
在使用SpringMVC绑定基本类型(如String,Integer等)参数时,应通过@RequestParam注解指定具体的参数名称否则,当源代码在非debug模式下编译后,运行时会引发HandlerMethodInvocationException异常,这是因为只有在debug模式下编译,其参数名称才存储在编译好的代码中
java.lang.IllegalStateException: No parameter name specified for argument of type [java.lang.Integer], and no parameter name information found in class file either.
最好的做法是通过@RequestParam注解指定具体的参数名称