Spring / Spring module questions
This module provides the fundamental functionality of the spring framework. A primary component of the core container module is the BeanFactory which is considered as the heart of any spring-based application.
The entire spring framework is built and operated on the top of this core module. This module makes the Spring container.
The Application context module enables spring as a functional framework. This module extends the concept of BeanFactory, provides the support for internationalization (I18N) messages, application lifecycle events and validation.
This module enables many enterprise services such as JNDI access, EJB integration, remoting and scheduling. This module also facilitates easy integration with the other frameworks.
Aspect Oriented Programming (AOP) enable OOP to have additional functionalities by intercepting across application modules/features.
The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect. Spring AOP (Aspect-oriented programming) framework modularize cross-cutting concerns in aspects as an interceptor to intercept processes,procedures and modules of OOP.
Annotations driven configuration is introduced in spring 2.5.
Spring 3 incorporated Java 5 features.
Spring 4 enables full support for Java 8 and the minimum supported Java version is SE 6.
JDBC abstraction and DAO module helps keep up the database code clean and simple, prevent problems that result from a failure to close database resources like connections.
It provides a layer of meaningful exceptions on top of the error messages thrown by several database servers.
It also makes use of Spring AOP module to provide transaction management services for objects in a Spring application.
Spring supports use of an object relational mapping (ORM) tool over JDBC by providing the ORM module.
Spring provides support to enable several popular ORM frameworks, including Hibernate, JDO, and iBATIS SQL Maps. Spring's transaction management supports each of these ORM frameworks as well as JDBC.
The Spring web module built on the application context module, provides a context that is appropriate for web-based applications. This module also contains support for several web-oriented tasks such as transparently handling multipart requests for file uploads and programmatic binding of request parameters to your business objects. It also contains integration support with Jakarta Struts.
MVC framework is provided by Spring for building web applications. Spring can easily be integrated with other MVC frameworks, but Spring?s MVC framework is a better choice, since it uses IoC to provide for a clean separation of controller logic from business objects. With Spring MVC you can declaratively bind request parameters to your business objects.
The FileSystemXmlApplicationContext container loads the definition of the beans from the Configuration XML file. The full path of the XML bean configuration file must be provided to the constructor.
The ClassPathXmlApplicationContext container also loads the definition of the beans from an XML file. Here, you need to set CLASSPATH properly because this container will look bean configuration XML file in CLASSPATH.
The WebXmlApplicationContext container loads the XML file with definitions of all beans from within a web application.
AnnotationConfig ApplicationContext, a standalone application context, accepts annotated classes such as @Configuration-annotated classes also @Component types and JSR-330 compliant classes using javax.inject annotations.
Spring allows you define multiple contexts in a parent-child hierarchy.
The applicationContext.xml defines the beans for the root webapp context, the context associated with the web application.
The spring-servlet.xml defines the beans for one servlet's app context. There can be many of these in a webapp, one per Spring servlet.
Bean definition inheritance can be implemented by specifying parent property of the bean equal to its parent bean definition id. This bean class must have extended itself from the parent bean class.