Spring Framework

Spring Projects

Spring Project 1

AbstractController in Spring MVC
Previous Home Next

The AbstractController provide the facility to abstract base controller. This controller provide the facility to caching headers and the enabling or disabling of supported method for example get and post. this controller also implement the Controller interface, it is also contain the Template method design pattern.


 public abstract class AbstractController
extends WebContentGenerator
implements Controller

There are following method of AbstractController:


public final void setSynchronizeOnSession
(boolean synchronizeOnSession);


public final boolean isSynchronizeOnSession();



public final ModelAndView handleRequest
(HttpServletRequest request,HttpServletResponse response)
throws Exception


FONT COLOR="#0000ff">protected abstract ModelAndView handleRequestInternal
(HttpServletRequest request,HttpServletResponse response)
throws Exception 

Example of AbstractController in Spring MVC

Previous Home Next