springmvc参数传递不给参数值默认值设置方法
@RequestMapping("hello")
public voiid test001(@RequestParam(defaultValue = "11") int age, @RequestParam(defaultValue = "0.1") double money){
System.out.println("age:" + age + ",money:" + money);
}
注意:

默认值 不加 "" 报错
@RequestMapping("hello")
public voiid test001(@RequestParam(defaultValue = "11") int age, @RequestParam(defaultValue = "0.1") double money){
System.out.println("age:" + age + ",money:" + money);
}
注意:

默认值 不加 "" 报错