Springmvc login

Reprinted from: https://blog.csdn.net/caiwenfeng_for_23/article/details/45486233.

spirng mvc default index controller mode 

If there is no default page configured in the tomcat container, why spring mvc will actively look for the controller of /index, if there is one, it will be called, if not, the 404 page will be displayed. 
@RequestMapping(value=”/index”) 
public ModelAndView index(HttpServletRequest request, HttpServletResponse response){ 
return new ModelAndView(“index”); 

}


Generally, when logging in, the JSP is accessed through control, so that the interceptor can intercept it. When entering the JSP for the first time, it will not pass through the interceptor.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326527052&siteId=291194637