Rename some urls.

This commit is contained in:
alex-semenyuk
2015-07-21 15:07:32 +02:00
parent c4bc953d1c
commit 877b8d2987
3 changed files with 38 additions and 24 deletions

View File

@@ -38,14 +38,15 @@ public class RedirectController {
return new RedirectView("redirectedUrl");
}
@RequestMapping(value = "/redirectWithForwardPrefix", method = RequestMethod.GET)
public ModelAndView redirectWithUsingForwardPrefix(final ModelMap model) {
@RequestMapping(value = "/forwardWithForwardPrefix", method = RequestMethod.GET)
public ModelAndView forwardWithUsingForwardPrefix(final ModelMap model) {
model.addAttribute("attribute", "redirectWithForwardPrefix");
return new ModelAndView("forward:/redirectedUrl", model);
}
@RequestMapping(value = "/redirectedUrl", method = RequestMethod.GET)
public ModelAndView redirection(final ModelMap model, @ModelAttribute("flashAttribute") final Object flashAttribute) {
public ModelAndView redirection(final ModelMap model,
@ModelAttribute("flashAttribute") final Object flashAttribute) {
model.addAttribute("redirectionAttribute", flashAttribute);
return new ModelAndView("redirection", model);
}