标签:通过 title div stp 默认 ping alt list use
最简单的两种写法,加或不加@RequestParam注解
@RequestMapping("/list") public String test(int userId) { return "list"; } @RequestMapping("/list") public String test(@RequestParam int userId) {
return "list"; }
区别:
用法如下:
@RequestMapping("/list") public String test(@RequestParam(value = "userId", defaultValue = "0", required = false) int userId) { return "list"; }
标签:通过 title div stp 默认 ping alt list use
原文地址:https://www.cnblogs.com/javalanger/p/12607907.html