Introduction to Spring
IOC or DI in Spring
- Annotation approach for DIAnnotation approach for constructor injection
In this approach we place @Resource on the property or setters of the class. Little cleaner than xml file, because managing long xml files is not easy for humans.
Annotation approach for DI
- Other cases of DI
a) Spring : Inheritance between beans
b) Factory methods helps us to write classes with factory design pattern.
---Spring : factory-method
---Spring : Factory methods with parameters
---Spring : Creating custom factory-bean
c) Lookup method injection
---Spring : Lookup Method injection - Lazy initialization of beans
Earlier we discussed lookup method injection. Now we can discuss about lazy initialization, and alternative approach to lookup method injection.
Spring : ApplicationContextAware Interface
Spring : ObjectFactory Interface
Spring : ServiceLocatorFactoryBean Interface - Managing property filesSpring : PropertyOverrideConfigurer
Types of Properties in java
Managing Property files with spring
Spring : Configuring properties file with PropertyPlaceholderConfigurer
- Other cases of DI (examples)
Can an Innerclass be instantiated in Spring?
Spring Map ExampleSpring List Property Example
- Spring 3.0 EL support
- Lifecycle of beans
Spring : BeanNameAware Interface
Spring : init-method and destroy-method
Spring : BeanPostProcessor interface
Spring : BeanFactroyPostProcessor interface
Spring : Lifecycle interface
Spring : DisposableBean Interface and Initializing...
@PostConstruct and @PreDestroy example
@Required annotation
AOP
Need for AOPIntroduction to AOP
Spring AOP vs AspectJ
AOP support in spring
Advices would have been explained in above mentioned points. So we can talk about them now.
Advice types in spring
Terminology of AOP ( though some part covered in above points)
Writing the Aspect class
Using xml style configuration
Using annotation style configuration
About joinpoint object
Pointcut expressions
Binding parameters to advice
Named pointcuts
Implementing After and AfterReturning Advice
Exception handling using AOP
Implementing Around Advice in aop
Pitfalls of AOP
No comments:
Post a Comment