ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
String basePath = servletContext.getContextPath();
mv.setView(new RedirectView(basePath+"/main"));
org.springframework.web.context.ContextLoader 对象
org.springframework.web.servlet.view.RedirectView 对象