您可以使用该
params参数按HTTP参数进行过滤。在您的情况下,它将类似于:
@RequestMapping(value = "/searchUser", params = "userID")public String searchUserById(@RequestParam long userID, Model model) { // ...}@RequestMapping(value = "/searchUser", params = "userName")public ModelAndView searchUserByName(@RequestParam String userName) { // ...}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)