SpringBoot 参数传递的问题
2018-01-24 13:41
225 查看
1、字段少的话 最好使用@Requestparam 的Key-value形式
前段所传的参数为对象
2、所传的字段为List<String>的形式,用@Requestparam来修饰传递参数 所传对象为对象
前段所传的参数为对象
@PostMapping("/getCashFlowSeq") public ResultJson getCashFlowSeq(@RequestHeader("tenantUid") String tenantUid, @RequestParam("accsetUid") String accSetUid, @RequestParam("period") String period) { return cashJournalAccountService.getCashFlowSeq(accSetUid, period); }
2、所传的字段为List<String>的形式,用@Requestparam来修饰传递参数 所传对象为对象
@PostMapping("/getCashFlowSeq") public ResultJson getCashFlowSeq(@RequestHeader("tenantUid") String tenantUid, @RequestParam("ids") List<String> ids) { }
相关文章推荐
- c++之指针作为函数参数传递的问题
- 解决ext+struts传递中文参数的乱码的问题
- Android消息通知PendingIntent传递参数出问题
- jsp传递中文参数乱码问题
- Java中String类型的参数传递问题的解析
- DLL中传递STL参数,vector对象作为dll参数传递等问题
- 参数传递问题:
- 指针作为函数的参数传递的问题
- DLL中传递STL参数,vector对象作为dll参数传递等问题(转)
- 解决ajax传递中文参数,出现乱码的问题
- 【转】解决jsp参数传递乱码的问题
- 两个jsp页面传递参数问题
- Java中参数传递的问题
- windows传递中文参数给WebBrowser的问题
- asp.net 解决js传递参数时,url汉字乱码的问题
- AngularJSURL参数传递问题
- 使用Get方式传递中文参数的问题乱码问题
- JS与Struts1参数传递获取中文乱码问题
- C#解决EventHandler参数无法传递问题
- struts2 redirect-action 传递参数问题