So, I'm still kind of new to Spring, having done a good amount of work on it, but never started much from scratch, so I might be missing something obvious
I believe that this line of code:
return new ModelAndView("redirect:" + getNewURL());
is what is responsible for doing a 302 (Moved Temporarily) redirect .
i don't know if this is kind of a "built in" to Spring behavior or if there's some kind of configuration that gets that to work, but I need to get a similar redirection going as a 301 (Moved Permanently) redirect, since we believe that search engines prefer that.
I'm not sure where to find out how the redirection is supposed to be setup, what I would have to do to get the HTTP headers right for the other kind of redirect... it looks like I'm pretty close to the top of "our" program stack, where Spring etc's Filter Chain kicks in, but i could be missing something...