In my app, for certain reasons I would like to be able to get the value of the @RequestMapping in the corresponding methods, however, I can't find a way to do that. Here are more details about what I want:
Suppose, I have a method like this:
@RequestMapping(value = "/hello")
@ResponseBody
public void helloMethod(AtmosphereResource atmosphereResource) {
...
}
I would like to be able to get the mapping "/hello" within the method. I know, I can use placeholders in the mapping in order to get their values when the actual requests come, but I need a finite set of processable requests, and I don't want a chain of if
s or switch
es in my method.
Is it at all possible?