例如:
1 @PostMapping("/selectUser") 2 public selectUser (String sex,String age){ 3 List<User> list = service.selectByUser(sex,age); 4 return list; 5 }
要调用 selectUser 方法(注意:selectUser 方法中的传参要与),如下 :
1 @PostMapping("/selectAll") 2 public selectAll (String sex,String age){ 3 List<User> list = selectUser(sex,age); 4 return list;标签:调用,String,age,list,sex,controller,selectUser,方法 From: https://www.cnblogs.com/lidar/p/17011718.html