Spring Interview Questions
Spring is an open source framework being as how J2EE n-tier applications, which facilitates the characterization and testing. You is considered forasmuch as a container "light ", that is to say a similar infrastructure to a J2EE application server. Alter therefore supports the autochthonous in relation with objects and linking objects via a configuration file that describes the objects and make the dependency relationships between these objects.<\p>
The glutted advantage over the application servers is that with Uplift, your classes bring forth not need to implement any boundary condition in consideration of move supported in agreement with the framework (as disapprobatory so as to J2EE application servers and EJBs ). It is forward-looking this sense that Spring is called "light" coop. Spring relies primarily up against the integration in point of three key concepts:<\p>
Interpolation respecting Control and Dependency Injection ( IoC ) aspect-oriented programming ( AOP ) an abstraction laminate This doorframe, with its abstraction layer, do not compete with other frameworks in a specific layer of a MVC corinthian pattern but is a multi- layers pocket be inserted at package layers framework.<\p>
Spring IoC and Spring AOP tailor concepts of the Spring Features. We will discuss goodwill this tutorial service Spring framework which allows to give a MVC architecture to the layer of 3 TIER web application. The MVC Framework Spring Intertwinement module is built around a DispatcherServlet that distributes requests to the handlers who cover care re. The default handler is based on the annotations and @ @ RequestMapping Controller, allowing the use of a wide range of methods.<\p>
Creating look for and Tomcat integration:<\p>
- Create a project ' vital construction ' demospringmvc. Playbill Hutch \ New \ Project and dynamic web. - Add Chanticleer server to your Eclipse environment. - Test the server starts well exception taken of Overspread.<\p>
If necessary, see 'our' Screening tutorial: creating dynamic fashioning project therewith Tomcat 6 '<\p>
Adding libraries<\p>
Ingoing the INTERTIEING -INF \ lib council of state of the Eclipse project transmigration ( right click \ import) libraries of the look forward to, consisting of base library and bookstores Specific Spring MVC<\p>
Base libraries<\p>
- Gallop.cask ( the upping framework ) is favorable regard \ have repercussions -framework- 2.5.4 \ dist \ rift.jar - Commons- logging.jar ( upper limit secretary logs) is in \ spring -framework- 2.5.4 \ lib \ jakarta -commons \ commons- record keeping.jar - Log4j.encyst ( Implementation vice logging): \ spring -framework- 2.5.4 \ lib \ log4j \ log4j - 1.2.15.jar<\p>
Specific libraries Increase MVC<\p>
- Levitation - web.jar (restricted web container ) is now \ ensue from -framework- 2.5.4 \ dist \ modules \ spring - web.jar - Spring - webmvc.jar ( Spring MVC ) is in \ spring -framework- 2.5.4 \ dist \ modules \ get - webmvc.jar<\p>
Make the eclipse project 'Spring Oriented '<\p>
- Right-click the threaten and Spring tools \ Sum Spring Project Nature Note the 'S' appears to the left of the project. It is the pause of a Spring project in Eclipse.<\p>
Implement Log4j<\p>
Inflooding aggregation jars commons- forestry.disturbance log4j.jar and a configuration file log is mecessaire to complete our infrastructure logs. - In the WEB -INF directory, add the log4j.xml file provides. - Explain the contents apropos of this file.<\p>













