2. We’ll Cover
Evolution of Spring.
Why Spring?
Application Contexts.
Survey of Spring Landscape.
Getting Started
3. Evolution of Spring
First release of JavaBeans Spec in Dec,
1996.
Enterprise Java Beans Spec in March, 1998.
Dependency Injection and AOP
Simplification of java development in demand.
Spring meets the demands.
4. Why Spring?
Spring Simplifies Java Development.
Lightweight and minimally invasive development
with POJOs.
Loose coupling using DI and Interface Orientation.
Declarative programming using Aspects and
common convention.
Boilerplate reduction using Aspects and templates.
9. A Bean’s Life
Spring instantiates the bean.
Spring injects bean refs and values into the bean’s properties.
Call to aware implementations. e.g. If BeanNameAware is implemented,
Spring passes the bean’s ID to the setBeanName method.
BeanPostProcessor if implemented Spring calls
postProcessBeforeInitialization.
InitializingBean interface if implemented, Spring call afterPropertiesSet
method.
BeanPostProcessor if implemented Spring calls
postProcessAfterInitialization.
Bean is ready here and getting used in the application iteratively.
DisposableBean if implemented, Spring calls destroy method of bean.
10.
11. Getting Started
Prefer learning core spring and then
associated plugins like spring security, web,
transaction etc.
Spring is not constrained to a web application.
Creating a project with Intelli J idea.
Learn by scenarios together with other
methodologies.
12. Examples
With different application contexts.
With different scopes.Prototype and singleton
With init and destroy methods(global and
local).