有没有办法使用 Spring MVC 设置页面的显示 url?让我举个例子更清楚:我有以下控制器:
@Controller
public class Display{
@RequestMapping(value = "myPage")
public ModelAndView display() {
ModelAndView result = new ModelAndView(Uris.MY_PAGE);
return result;
}
@RequestMapping(value = "myPage/revisited")
public ModelAndView accountManagement() {
ModelAndView result = new ModelAndView(Uris.ACCOUNT);
return display();
}
}
如果我继续myPage/Revisited
,我将获得关联到的 JSP myPage
。但是,在我的浏览器中,url 将保持不变 ( myPage/revisited
)。我怎么能防止呢?