Sunday, November 2, 2014

Spring MVC


Lifecycle - HTTP Request -> DispatcherServlet -> Web Application Context (Handler Mapping, controller, view resolver) -> View Response
JNDI lookup - provides an entry point to all db objects in servlet
Tiles-defs.xml - all the jsp and view definitions
Spring Singleton - declare bean as singleton scope
Bean Scopes - singleton, Request, Session, Universal Session
Create Immutable class - all methods private and static, no setter methods for variables, no subclass to override methods
@Autowire in java or autowire="asSetter or Contructor" in XML - scans for the components needs to wire the object in the package - add components to the context file
IOC - create a class and add it to spring context xml file - the class gets added to the spring container and Inversion of Control is achieved Bean Context and Application Context

No comments:

Post a Comment