-
Sep 15th, 2012, 07:41 AM
#1
Bean definition inheritance
Hi,
If in container i use Bean definition inheritance feature and make one bean use other as parent, then can i also access the methods from parent class or only the properties...
-
Sep 16th, 2012, 11:58 AM
#2
Bean inheritance is a way to move common part of configuration to a parent bean. It has nothing to do with Java class inheritance. So there is no parent class, there is only a bean target class that can be configured either in a child bean or its parent bean definition. When you have bean A as parent and bean B as its child, when creating B, a merged definition of A and B is used (only one target class, properties elements are merged).
>> can i also access the methods from parent class or only the properties...
In a bean definition, you can access properties (like in any other bean definition). In a class instance, you can access all methods of the target bean class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules