控制器是mvc模式中非常重要的部分。
Spring中org.springframework.web.portlet.mvc 包有10种controller :
Spring中org.springframework.web.servlet.mvc包有13种controller :
一 :Controller接口
Spring中最基本的是org.springframework.mvc.Controller接口。public interface Controller {
ModelAndView handleRequest( HttpServletRequest request, HttpServletResponse response) throws Exception;
}
这个接口非常的简单,只有一个可以返回适当Model和View的请求处理方法。除了这个接口Spring还提供了一些