1. Reporter: Brian
  2. Aspect Oriented Programming
    1. Used to decouple the cross-cutting-concerns from the object
  3. Inversion of Control
    1. Dependency Injection is one kind of IoC
      1. classes in a project should be as independent as possible to make the code reusable and testable
      2. DI is used to glue the code to make them cooperate with each other while keeping them independent
      3. DI exists in two major variants
        1. Constructor-based DI
        2. Setter-based DI
  4. Ioc Container
    1. Spring BeanFactory Container
      1. The most commonly used BeanFactory implementation is the XmlBeanFactoryclass
      2. Reads the configuration metadata from an XML file and uses it to create a fully configured system or application.
      3. Preferred where the resources are limited like mobile devices or applet based applications.
    2. Spring ApplicationContext Container
      1. The ApplicationContext container includes all functionality of the BeanFactory container, so it is generally recommended over the BeanFactory.
      2. FileSystemXmlApplicationContext
      3. ClassPathXmlApplicationContext
      4. WebXmlApplicationContext
    3. Decoupled from the format in which this configuration metadata is actually written.
    4. three important methods to provide configuration metadata to the Spring Container
      1. XML based configuration file.
      2. Annotation-based configuration
      3. Java-based configuration
  5. Beans
    1. The most basic unit in Spring, they work together to reach a common goal
    2. Set up the configurations in the container to tell it what beans should contain & how to wire them together so as to coorparate
    3. A bean is an object that is instantiated, assembled, and otherwise managed by a Spring IoC container.
    4. configuration metadata
      1. How to create a bean
      2. Bean's life cycle
      3. Bean's scope
  6. Bean Definition(Attributes)
    1. class
      1. specify the bean class to be used to create the bean.
    2. name
      1. specifies the bean identifier uniquely.
    3. scope
      1. specifies the scope of the objects
      2. singleton(Default)
        1. Spring will return the same bean instance each time one is needed
      3. prototype
        1. Force Spring to produce a new bean instance each time one is needed
      4. request
        1. This scopes a bean definition to an HTTP request.
      5. session
        1. This scopes a bean definition to an HTTP session.
      6. global-session
        1. This scopes a bean definition to a global HTTP session.
    4. constructor-arg
      1. used to inject the dependencies
    5. properties
      1. used to inject the dependencies
    6. autowiring mode
      1. used to inject the dependencies
    7. lazy-initialization mode
      1. ells the IoC container to create a bean instance when it is first requested, rather than at startup.
    8. initialization method
      1. A callback to be called just after all necessary properties on the bean have been set by the container.
    9. destruction method
      1. A callback to be used when the container containing the bean is destroyed
  7. BeanPostProcessor
    1. defines callback methods that you can implement to provide your own instantiation logic, dependency-resolution logic etc.
  8. Bean Definition Inheritance
  9. Autowiring modes
    1. no
    2. byName
    3. byType
    4. constructor
    5. autodetect
    6. Annotation based configuration
      1. @Required
        1. The @Required annotation applies to bean property setter methods.
      2. @Autowired
        1. can apply to bean property setter methods, non-setter methods, constructor and properties.
        2. @Autowired on Setter Methods
        3. @Autowired on Properties
        4. @Autowired on Constructors
        5. @Autowired with (required=false) option
      3. @Qualifier
        1. The @Qualifier annotation along with @Autowired can be used to remove the confusion by specifiying which exact bean will be wired.
      4. @Resource
  10. Spring Java Based Configuration
    1. @Configuration
    2. @Bean
    3. @Import
  11. Spring XML Based Configuration
  12. Event Handling
    1. ApplicationContext
      1. core of Spring
      2. manages complete life cycle of the beans
    2. Standard Events
      1. ContextRefreshedEvent
      2. ContextStartedEvent
      3. ContextStoppedEvent
      4. ContextClosedEvent
      5. RequestHandledEvent
  13. Spring JDBC Framework
  14. Spring Transaction Management
    1. Local transaction
    2. global transactions
    3. Key properties
      1. Atomicity:
      2. Consistency
      3. Isolation
      4. Durability
    4. two types of transaction management
      1. Programmatic
      2. Declarative