@PathVariable和@RequestParam的区别
@PathVariable和@RequestParam的区别PathVariable用于接收url路径上的参数,而RequestParam用于接收请求带的参数。import org.springframework.web.bind.annotation.*;@RestController@RequestMapping(“demo”)public class DemoController {@GetMapping("/test{id}")public String testPathVariabl
原创
2021-03-17 16:08:10 ·
852 阅读 ·
4 评论