@RequestParam 与 @PathVariable 的区

2020-03-08  本文已影响0人  刘小刀tina
 **
     * @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);
     *      *  }
     */
上一篇 下一篇

猜你喜欢

热点阅读