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.测试流程

 

posted @ 2020-06-14 11:03  小陈子博客  阅读(1854)  评论(0编辑  收藏  举报