Spring callback methods

Callback method: A callback method in java is a method which is called when an event occurs. Normally we can implement that by passing an implementation of a certain interface to the system which is responsible for triggering the event. Commonly used callback methods in spring: Post-initialization callback methods: Using InitializingBean interface: The InitializingBean interface … Read more

Spring bean life cycle

Spring bean life cycle: As we discussed earlier spring IoC container is responsible to create, configure and manage objects during their complete life cycle using configuration metadata. See the below points to understand the spring bean life cycle. Bean lifecycle in spring framework: 1. Spring container finds the bean definition from configuration file. 2. Spring … Read more

Spring bean scopes

Spring bean scopes: As we discussed that spring container is responsible for creating and managing bean object. Spring provides the facility to return the same instance or a new instance each time when one is needed. It depends upon the bean scope. Spring framework bean scopes: Bean Scope Description 1. singleton It scopes the bean … Read more

Spring bean

A spring bean represents an object that is created, configured and managed by spring container. A spring bean is created by configuration metadata passed to the spring container which tells the container about bean creation, bean lifecycle and bean dependencies. Spring bean properties: Bean Properties Description 1. class It is mandatory and specify the bean … Read more

Spring IoC container types

Spring IoC container is responsible for create, wire, configure and manage objects during their complete life cycle. It uses configuration metadata for create, configure and manage objects. Configuration metadata can be represented by spring configuration xml file or annotations. Types of Spring IoC container: 1. BeanFactory 2. ApplicationContext BeanFactory: BeanFactory org.springframework.beans.factory.BeanFactory is the interface and … Read more

Spring framework architecture modules

Spring framework is designed in modular fashion from which a programmer can choose the applicable modules and ignore the rest. Spring framework modules are divided into categories given below. Spring framework architecture Diagram: 1. Test: Spring test module provides the supports for testing of spring components with JUnit or TestNG frameworks. 2. Core Container: Spring … Read more