美文网首页
@RequestParam 与 @PathVariable 的区

@RequestParam 与 @PathVariable 的区

作者: 刘小刀tina | 来源:发表于2020-03-08 19:51 被阅读0次
 **
     * @GetMapping(value = "/get")
     *  public CommonResult create(@RequestParam String id ){
     *      return   restTemplate.getForObject(BASE_URL+"payment/get/?id="+id,CommonResult.class);
     *  }
     *             
     *
     * @GetMapping(value = "/get/{id}")
     *      *  public CommonResult create(@PathVariable String id ){
     *      *      return restTemplate.getForObject(BASE_URL+"payment/get/"+id,CommonResult.class);
     *      *  }
     */

相关文章

网友评论

      本文标题:@RequestParam 与 @PathVariable 的区

      本文链接:https://www.haomeiwen.com/subject/xvpjdhtx.html