Multiple "inheritance" (initialzation) of dependencies for bean definitions.
In my project I need something like multiple inheritance (better to say inheritance of dependencies) for bean definitions. Of course, it is clear that multiple inheritance is not a very good way to solve some problems and is anti-pattern, but ...
There is an inheritance of such bean definitions:
Abstract1 is parent for Abstract2
Abstract2 is parent for Abstract3
This definitions have some dependencies those are initialized.
And we have also such structure.
Concrete1 is parent for Concrete2 and Concrete1 has also some identical dependencies as in Abstract1
Concrete2 is parent for Concrete3 and Concrete2 has also some identical dependencies as in Abstract3
Concrete3 has also some identical dependencies as Abstarct3.
In real world for Abstarct1 and Concrete1 is used same Class, and it is also true for Abstarct2 and Concrete2, Abstarct3 and Concrete3.
I can define only one parent, but for example for Concrete3 it will be great to have all dependencies form Abstract 3 overridden by defined in Concrete2.
Is there any possibility to implement with Spring (standard way or it is possible to create some special extension)?
Could anyone help me?
Thanks in advance.
P.s. Sorry, if I duplicate this question.