HTTP Status 400
来源:互联网 发布:windows一直系统还原 编辑:程序博客网 时间:2024/06/05 23:48
HTTP Status 400 - Required Long parameter 'id' is not present
type Status report
message Required Long parameter 'id' is not present
description The request sent by the client was syntactically incorrect (Required Long parameter 'id' is not present).
Apache Tomcat/6.0.29
代码如下:
@Controller
@RequestMapping("/item/cat")
public class ItemCatController {
@Autowired
private ItemCatService itemCatService;
@RequestMapping("/list")
@ResponseBody
public List<EasyUITreeNode> getItemCatList(@RequestParam(value="id")Long parentId){
List<EasyUITreeNode> list = itemCatService.getItemCatList(parentId);
return list;
}
}
@RequestMapping("/item/cat")
public class ItemCatController {
@Autowired
private ItemCatService itemCatService;
@RequestMapping("/list")
@ResponseBody
public List<EasyUITreeNode> getItemCatList(@RequestParam(value="id")Long parentId){
List<EasyUITreeNode> list = itemCatService.getItemCatList(parentId);
return list;
}
}
访问的URL:http://localhost:8080/taotao-manager-web/item/cat/list
当使用@RequestParam绑定参数时会出现这种情况,第一次访问时无id,需要为其加上默认的id,即@RequestParam("value="id",defaultValue="0")
阅读全文
0 0
- HTTP Status 400
- HTTP Status 400
- HTTP Status 400
- HTTP Status 400
- HTTP Status 400
- HTTP Status 400
- HTTP Status 400
- HTTP Status 400
- HTTP Status 400 - 问题集成
- http status 400,http 400,400 错误
- http status 400,http 400,400 错误
- http status 400,http 400,400 错误
- http status
- HTTP::Status
- http status
- HTTP STATUS
- http status
- svn 1.8 unexpected http status 400 ''
- 分布式数据库TiDB中优化器相关代码
- python连接
- 怎样让静态库(static library)中的category变得可用
- 试玩UML(User Mode Linux)
- 柱状图
- HTTP Status 400
- POJ 1376 Robot
- java分布式任务调度xxl-job
- DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016 解决方案
- 软考常考知识点整理-项目机会研究
- WinX DVD Ripper Platinum(DVD转换工具)官方破解版V8.6.0.208下载 | winx dvd ripper 破解版无需winx dvd ripper 注册码
- shell 脚本,将war包从指定位置解压到tomcat/WebApps下并启动项目
- 险些“B轮死”的小猪短租,如何穿越了融资生死线
- 详解BAT盘根错节的O2O矩阵格局