在业务控制方法中收集数组参数

复制代码
@Controller
@RequestMapping(value="/user")
public class UserAction {
    @RequestMapping(value="/delete")
    public String deleteMethod(int[] ids,Model model) throws Exception{
        System.out.println("UserAction::deleteMethod()");
        System.out.println("需要删除的id为:");
        for(int id : ids){
            System.out.print(id+" ");
        }
        model.addAttribute("message","批量删除成功");
        return "/success.jsp";
    }
}
复制代码

 

posted on   LoaderMan  阅读(140)  评论(0编辑  收藏  举报

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

喜欢请打赏

扫描二维码打赏

了解更多

点击右上角即可分享
微信分享提示