- GET请求:
@RequestMapping(value = "qry", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public String getPackageList(HttpServletRequest request, HttpServletResponse response){
PackageCustomizationVO vo = new PackageCustomizationVO();
ServletRequestDataBinder binder = new ServletRequestDataBinder(vo);
binder.bind(request);
//DO SOMETHING
return vo.toString();
}
- POST请求
public String addPackage(@RequestBody PackageCustomizationVO vo){ return vo.toString(); }