三种写法,test(String name), 
test(@RequestParam String name), 
test(@RequestParam("userName") String name), 
第一种如果没有name 参数不会报错, 
第二种没有name 参数会报错,(也可以设置required = false), 
第三种跟第二种的区别是name 参数换为userName。

相关文章:

  • 2021-06-19
  • 2021-09-06
  • 2021-07-27
  • 2021-09-18
  • 2021-12-30
  • 2021-07-01
  • 2022-12-23
  • 2021-09-30
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-12-21
  • 2021-09-17
  • 2022-12-23
相关资源
相似解决方案