postman spring @PathVariable和@RequestBody怎么测试
1.方法如下
@ResponseBody @RequestMapping(value = "/updateByPrimaryKey/{id}",method = RequestMethod.GET) public CommonResult updateByPrimaryKey( @PathVariable("id") long id,@RequestBody PmsBrand pmsBrand){ LOGGER.debug("id"+"sssss"); CommonResult commonResult; int i = pmsBrandService.updateByPrimaryKey(id, pmsBrand); if(i>0){ commonResult= CommonResult.success(pmsBrand); }else{ commonResult= CommonResult.failed("操作失败"); } return commonResult; }
2.测试流程
本文来自博客园,作者:小陈子博客,转载请注明原文链接:https://www.cnblogs.com/cj8357475/p/13124090.html