Skip to content

gauravworkss/Sriman_Springs_Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring MVC as per Spring 3.0 Docs

Spring MVC Request View

Spring Different HandlerMapping

  1. AbstractControllerUrlHandlerMapping
  2. AbstractDetectingUrlHandlerMapping
  3. AbstractHandlerMapping
  4. AbstractMapBasedHandlerMapping
  5. AbstractUrlHandlerMapping
  6. BeanNameUrlHandlerMapping
  7. ControllerBeanNameHandlerMapping
  8. ControllerClassNameHandlerMapping
  9. DefaultAnnotationHandlerMapping
  10. HandlerMapping
  11. ParameterHandlerMapping
  12. RequestMappingHandlerMapping
  13. RequestMappingInfoHandlerMapping
  14. SimpleUrlHandlerMapping

Spring Different HandlerAdaptor

  1. HandlerAdapter : HandlerAdapter is responsible for actually invoking the handler. The handler is of type Object and hence the dispatcher servlet can handle any Handler type using the HandlerAdapter. Spring provides certain HandlerAdapters that can handle specific handler interfaces.
  2. SimpleServletHandlerAdapter : This adapter allows using the Servlet Interface. The adapter calls the service method of the Servlet. This adapter is not registered by default and needs to be registered in the DispatcherServlet as a bean. All handler beans that implement the Servlet interface are automatically handled by this adapter.
  3. SimpleControllerHandlerAdapter : Adapter for handlers that implement the Controller interface
  4. HttpRequestHandlerAdapter : Handles org.springframework.web.HttpRequestHandler interface. The HttpRequestHandler is used for handler that process HttpRequests. This interface is generally used to generate binary responses and does not have a ModelAndView return type. The spring remoting classes such as HttpInvokerServiceExporter and HessianServiceExporter implement this interface.
  5. AnnotationMethodHandlerAdapter : This adapter maps Handler methods based on HTTP paths, HTTP methods and request parameters. The request parameters are bound through @RequestParam annotation. Note that this Adapater is deprecated in spring 3.2 in favour of RequestMappingHandlerAdapter.
  6. RequestMappingHandlerAdapter : This adapter supports Handler of type HandlerMethod. This adapter is used with RequestMappingHandlerMapping and is the new class introduced in Spring 3.1. custom Resolvers can be set using

Spring Different Controllers

  1. AbstractCommandController
  2. AbstractController
  3. AbstractFormController
  4. AbstractUrlViewController
  5. AbstractWizardFormController
  6. BaseCommandController
  7. CancellableFormController
  8. ComponentControllerSupport
  9. Controller
  10. EventAwareController
  11. MultiActionController
  12. ParameterizableViewController
  13. PortletModeNameViewController
  14. PortletWrappingController
  15. ResourceAwareController
  16. ServletForwardingController
  17. ServletWrappingController
  18. SimpleControllerHandlerAdapter
  19. SimpleFormController
  20. UrlFilenameViewController

Spring Different ViewResolvers

In Spring MVC, view resolvers enable you to render models in a browser without tying you to a specific view technology like JSP, Velocity, XML…etc.

There are two interfaces that are important to the way Spring handles views are ViewResolver and View. The ViewResolver provides a mapping between view names and actual views. The View interface addresses the preparation of the request and hands the request over to one of the view technologies.

Below are the important viewresolvers provided by spring framework:

  1. AbstractCachingViewResolver : Abstract view resolver that caches views. Often views need preparation before they can be used; extending this view resolver provides caching.
  2. XmlViewResolver : Implementation of ViewResolver that accepts a configuration file written in XML with the same DTD as Spring’s XML bean factories. The default configuration file is /WEB-INF/views.xml.
  3. ResourceBundleViewResolver : Implementation of ViewResolver that uses bean definitions in a ResourceBundle, specified by the bundle base name. Typically you define the bundle in a properties file, located in the classpath. The default file name is views.properties.
  4. UrlBasedViewResolver : Simple implementation of the ViewResolver interface that effects the direct resolution of logical view names to URLs, without an explicit mapping definition. This is appropriate if your logical names match the names of your view resources in a straightforward manner, without the need for arbitrary mappings.
  5. InternalResourceViewResolver : Convenient subclass of UrlBasedViewResolver that supports InternalResourceView (in effect, Servlets and JSPs) and subclasses such as JstlView and TilesView. You can specify the view class for all views generated by this resolver by using setViewClass(..).
  6. VelocityViewResolver/FreeMarkerViewResolver : Convenient subclass of UrlBasedViewResolver that supports VelocityView (in effect, Velocity templates) or FreeMarkerView ,respectively, and custom subclasses of them.
  7. ContentNegotiatingViewResolver : Implementation of the ViewResolver interface that resolves a view based on the request file name or Accept header.
  8. ViewResolver : View Resolvers get a org.springframework.web.servlet.View based on a view name.
  9. JasperReportsViewResolver : Supports AbstractJasperReportsView by resolving the view name to the URL of the report file.

About

Sriman Spring Applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages