View RSS Feed

Spring Framework

Bean Post Processors in Spring

Rate this Entry
by , 07-07-2012 at 06:19 PM (1975 Views)
The callback methods are defined by the Bean Post Processor interface and it can be implemented to provide your instatiation logic and dependency resolution logic. When the instantiating, initializating and configuring of a bean is finished by the Spring container, some custom logic implementation can be done by you by integrating Bean Post Processor implementations.

More than one Bean Post Processor interfaces are allowed to use and configure and also it is possible to control the execution sequence of these Bean Processor interfaces with the help of setting the order property. This property is provided by the Bean Post Processor which implements the Ordered interface.

The Bean Post Processors operate on bean or object in following order:
A bean instance is instantiated by the Spring IoC
The Bean Post Processor interfaces perform their operation

All the beans which are defined using the Bean Post Processor interface are detected by the ApplicationContext and these beans are registered and called appropriately as post processors upon bean creation by the container.

Submit "Bean Post Processors in Spring" to Facebook Submit "Bean Post Processors in Spring" to Digg Submit "Bean Post Processors in Spring" to del.icio.us Submit "Bean Post Processors in Spring" to StumbleUpon Submit "Bean Post Processors in Spring" to Google

Categories
Bean

Comments