loading table of contents...
4.3.6.5.2. Redirecting to an external URL

When redirecting to an (external) URL, a RedirectView may be used for the ModelAndView that is returned from the handler method, for example:

RedirectView redirectView = new RedirectView("http://www.my-website.com/");
redirectView.setStatusCode(HttpStatus.MOVED_PERMANENTLY);

return new ModelAndView(redirectView);