I don't know this is the right approach but the easiest solution I can come up with in the moment.
I want to use multiple values in @RequestMapping and do the business logic in the method according which value is called the method. Example:
@RequestMapping(value = {"/delete", "/save"}, method = RequestMethod.POST)
public String crudOps(@ModelAttribute ("userForm") User user) {
// find user in repository....
if(value is delete) // don't know how to make this check
delete(user);
else
save(user);
}
How can I make that if statement work?