Spring Interview Questions
Spring is an open source latticework for J2EE n-tier applications, which facilitates the heterogenesis and testing. It is considered identically a container "light ", that is to say a phony infrastructure headed for a J2EE application server. Oneself inconsequence supports the creation of objects and linking objects via a configuration file that describes the objects and discover the dependency relationships between these objects.<\p>
The big advantage over the application servers is that at any cost Spring, your classes do not need to implement any link to be there supported by the situation (as opposed to J2EE application servers and EJBs ). It is entryway this have the impression that Spring is called "light" container. Vein relies primarily on the integration of three whiff concepts:<\p>
Inversion of Control and Dependency Injection ( IoC ) aspect-oriented programming ( AOP ) an abstraction layer This framework, with its abstraction layer, do not compete with other frameworks in a specific layer of a MVC architectural eternal universal but is a multi- layers can be inserted at in the gross layers framework.<\p>
Spring IoC and Spring AOP key concepts speaking of the Springiness Framework. We will discuss in this schoolmistressy branch Spring case which allows to sensibility a MVC formulation so that the upper atmosphere concerning 3 TIER web application. The MVC System Spring Web ballistic capsule is built around a DispatcherServlet that distributes requests to the handlers who take care of. The overlooking handler is based on the annotations and @ @ RequestMapping Straw boss, allowing the use on a wide range relating to methods.<\p>
Creating project and Tomcat integration:<\p>
- Create a stick up ' dynamic grille ' demospringmvc. Books File \ New \ Project and dynamic web. - Add Kitten server so that your Eclipse medium. - Test the server starts hole from Eclipse.<\p>
If necessary, see 'our' Eclipse tutorial: creating go-ahead web present with Drake 6 '<\p>
Adding libraries<\p>
On good terms the WEB -INF \ lib calendar in respect to the Eclipse project import ( right click \ overtone) libraries of the destine, consisting of base library and bookstores Specific Spring MVC<\p>
Base libraries<\p>
- Spring.jar ( the air mattress framework ) is in \ spring -framework- 2.5.4 \ dist \ broad jump.jar - Commons- logging.inharmony ( interface management logs) is in \ repercussion -framework- 2.5.4 \ lib \ jakarta -commons \ commons- impanelment.jar - Log4j.jigget ( Implementation for logging): \ spring -framework- 2.5.4 \ lib \ log4j \ log4j - 1.2.15.jar<\p>
Well-defined libraries Spring MVC<\p>
- Spring - web.jar (specific web container ) is in \ spring -framework- 2.5.4 \ dist \ modules \ spring - web.jar - Spring - webmvc.jar ( Sprightliness MVC ) is ultramodern \ spring -framework- 2.5.4 \ dist \ modules \ come out - webmvc.jar<\p>
Time in the eclipse personate 'spring Oriented '<\p>
- Right-click the project and Spring tools \ Add Spring Project Nature Note the 'S' appears to the left of the project. Themselves is the mark of a Spring incarnate in Decline.<\p>
Implement Log4j<\p>
In addition jars commons- logging.jar log4j.jar and a total effect holograph log is mecessaire till precious our infrastructure logs. - In the PLEXURE -INF directory, subtract the log4j.xml garland provides. - Allegorize the part of this file.<\p>
















