With Spring 3 (3.0.5-RELEASE), is it possible to set up a ReSTful Controller (using the @Controller annotation) to respond to different, but conflicting, URI patterns with a precedence rule?
For example, can I have two methods as follows?
@RequestMapping(value = "/profile/{profileId}", method = RequestMethod.GET)
public ModelAndView getProfile(final @RequestParam(value = "profileId") String pProfileId) {
...
}
and
@RequestMapping(value = "/profile/current", method = RequestMethod.GET)
public ModelAndView getCurrentProfile() {
...
}
and if so, how do I ensure that the constant form (e.g. "/profile/current") of the URI takes precedence over the parameterized form (e.g. "/profile/{profileId}") - i.e. it does not think that "current" is a profile ID.


Reply With Quote
