View RSS Feed

Spring Framework

Bean Definition Inheritance in Spring

Rate this Entry
by , 07-07-2012 at 06:20 PM (1316 Views)
Following information is contained by a bean definition:

Configuration information
Constructor arguments information
Container specific information like method initialization
Property values information
Names of static factory methods

Configuration data is inherited from the parent definition by the child bean definition. Some values are added or overridden by the child definition. There are no direct concerns between the java class inheritance and Spring Bean definition inheritance. Only the inheritance concept is same between the two. A parent bean definition can be defined as a template and the required information is inherited by the child beans from the parent bean.

A child bean definition is indicated in case where XML based metadata configuration is used when parent attributes are used, the value of attribute is specified as parent bean.

Submit "Bean Definition Inheritance in Spring" to Facebook Submit "Bean Definition Inheritance in Spring" to Digg Submit "Bean Definition Inheritance in Spring" to del.icio.us Submit "Bean Definition Inheritance in Spring" to StumbleUpon Submit "Bean Definition Inheritance in Spring" to Google

Categories
Bean

Comments