spring-mvc jumps to the jsp file in the root directory


When using spring-mvc's view controller to jump to a page, if the page is not placed under WEB-INF, you can use the following method to jump.

ModelAndView mv = new ModelAndView();
mv.setViewName("redirect:/index.jsp");

Guess you like

Origin blog.csdn.net/chenhq_/article/details/52160447