I have a controller which handles a specific URL
@RequestMapping(value= {"/myurl"})
public ModelAndView handleMyURL()
Instead I want to have 2 separate controllers that let me handle this same /myurl based on the parameters passed to it.
If URL is
/myurl?a=1
goto controller A, otherwise use controller B. Is there a way to do that?
I found this similar question Spring MVC - Request mapping, two urls with two different parameters where someone has mentioned "use one method in a misc controller that dispatches to the different controllers (which are injected) depending on the request param." , how do I implement that?