Spring

Introduction to Spring

Spring IDE and eclipse

IOC or DI in Spring

Spring approach for DI - Convention Over Configuration

  1. XML approach of DI
    Creating a bean descriptor XML file in spring
    Dependency injection via property or setter
    Spring constructor injection tutorial
    Defining contexts in different file
  2. Annotation approach for DI
    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
    Annotation approach for constructor injection
    Autowiring in Spring
    Autowiring in xml config

Various Dependency injection methods

  1.  IoC Container
    BeanFactory Interface
    ApplicationContext Interface
  2.  Scopes in Spring
    Bean scopes in Spring
    Defining scope by annotation in spring
  3.  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
  4. 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
  5. Namespaces in spring - Introduction
    Spring : Using the P namespace

  6. Managing property filesTypes of Properties in javaManaging Property files with springSpring : Configuring properties file with PropertyPlaceholderConfigurerSpring : PropertyOverrideConfigurer
  7. Other cases of DI (examples)
    Can an Innerclass be instantiated in Spring?

    Spring Map ExampleSpring List Property Example 
  8.  Spring 3.0 EL support
  9.  Lifecycle of beansSpring : BeanNameAware Interface
  10. Initializing the bean or destroying bean by some init method or destroy method
    --Spring : init-method and destroy-method
    --Implementing InitializingBean interface
    --http://k2java.blogspot.com/2011/03/postconstruct-and-predestroy-example.html
  11.  Spring : BeanPostProcessor interface
    Spring : BeanFactroyPostProcessor interfaceSpring : Lifecycle interface
    Spring : DisposableBean Interface and Initializing...
    http://k2java.blogspot.com/2011/03/postconstruct-and-predestroy-example.html  
    @Required annotation

Managing life-cycle of the bean

AOP tutorial for Spring

Spring JDBC tutorial

Chitika