测试环境:spring boot 2.1.0/*//数组和参数同时传递需要借助实体类实现//接收json@RequestMapping(value = "test3",method = RequestMethod.POST)public String test3(@RequestBody String obj){ System.out.println(obj); return "1";}//接收数组@RequestMapping(value = "test2",method = RequestMethod.POST)public String test2(String[] obj){ System.out.println(obj); return "1";}//接收指定参数@RequestMapping(value = "test1",method = RequestMethod.POST)public String test1(String id){ System.out.println(id); return "1";}*/
原文地址:https://www.cnblogs.com/vip95595/p/9968258.html
时间: 2024-10-13 00:58:05