No parameter name specified for argument of type [java.lang.Integer]
来源:互联网 发布:网页快速抢购js脚本 编辑:程序博客网 时间:2024/05/29 09:15
一个运用了spring mvc的项目,在eclipse tomcat下能够编译部署。在用ant打包后,在tomcat上部署后,访问action出现了此异常:No parameter name specified for argument of type [java.lang.Integer]
这个错误主要是因为action的参数注解默认是debug级别,比如
@RequestMapping(value = "/security/login", method = RequestMethod.POST)public ModelAndView login(@RequestParam String userName, @RequestParam String password, HttpServletRequest request) {
此时userName的级别是debug级别,而在ant编译时是忽略了这些标注,导致请求时就会找不到userName的参数。解决方法:
1. 修改参数的写法,比如修改为
@RequestMapping(value = "/security/login", method = RequestMethod.POST) public ModelAndView login(@RequestParam("userName") String userName, @RequestParam("password") String password, HttpServletRequest request) { ......................
2.简单的解决方法:
在ant脚本的javac中添加debug = “true”,也就是cmd中的javac -g,即编译时生成所有debug的信息。
<javac debug="true" >
阅读全文
0 0
- No parameter name specified for argument of type [java.lang.Integer]
- No parameter name specified for argument of type [java.lang.String]
- No parameter name specified for argument of type [java.lang.String],
- No parameter name specified for argument of type
- Name for argument type [java.lang.String] not available, and parameter name information not found in
- Name for argument type [java.lang.String] not available, and parameter name information not found in
- Name for argument type [java.lang.String] not available, and parameter name information not found in
- Name for argument type [java.lang.String] not available
- 关于spring java.lang.IllegalArgumentException: Name for argument type [java.lang.String] 的错误
- 关于spring java.lang.IllegalArgumentException: Name for argument type [java.lang.String] 的错误
- java.lang.IllegalArgumentException: Name for argument type [java.lang.String] not available, and p
- Name for argument type [java.lang.String] not available......bug处理
- No signature of method: java.lang.String.positive() is applicable for argument types: () values: []
- java.sql.SQLException: No value specified for parameter 16
- mybatis TypeHandler java.sql.SQLException: No value specified for parameter
- There is no getter for property named 'name' in 'class java.lang.Integer'
- javax.validation.UnexpectedTypeException: No validator could be found for type: java.lang.Integer
- HV000030: No validator could be found for type: java.lang.Integer.
- Mongo Pub/Sub
- Pycharm教程(2)——代码风格
- 验证码调用和web中字节字符流的解释
- java设计模式——策略模式
- java新项目保存页面提示GBK编码,无法保存
- No parameter name specified for argument of type [java.lang.Integer]
- iOS开发--如何调整Lable的字体行间距
- 布线问题 队列式分支算法
- 微信小程序tabBar底部导航中文注解api
- typescript+webpack+react.js
- CentOS 7 下安装 Nginx
- Windows下同时安装Py2和Py3
- Validate笔记一:初识表单验证插件Validate
- HTML 2017.07.17