以前写controller层的时候都是默认带上 @RequestParam 的, 今天发现不加@RequestParam 也能接收到参数
下面我们来区分一下加与不加的区别
这里有两种写法
- @RequestMapping("/list")
- public String test(@RequestParam Long parentId) {
- }
以前写controller层的时候都是默认带上 @RequestParam 的, 今天发现不加@RequestParam 也能接收到参数
下面我们来区分一下加与不加的区别
这里有两种写法