Announcement Announcement Module

JavaConfig forum decommissioned in favor of Core Container

As described at

key features of the Spring JavaConfig project have been migrated into the core Spring Framework as of version 3.0.

Please see the Spring 3.0 documentation on @Configuration and @Bean support:

For any questions related to @Configuration classes and @Bean methods in Spring 3.0, please post in the dedicated 'Core Container' forum at
See more
See less
how to wire inheritance in Java config ? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to wire inheritance in Java config ?


    Current Design-->
    BaseManager extends Manager extends Type1DataStoreImpl implements DataStoreInterface
    BaseManager is referenced everywhere in the application as
    for (DataStoreInterface o:BaseManager.getAllObjects()){};

    I have Type2DataStoreImpl implements DataStoreInterface

    I want to make minimum changes to the application ie BaseManager & Manager should not be replaced by new classes.

    Is there a way I can dynamically plug Type2DataStoreImpl as parent of Manager ( .properties file decides its type1 or type2 implementation) ?

    New Design
    BaseManager extends Manager extends Type1DataStoreImpl or Type2DataStoreImpl (depending on config file) implements DataStoreInterface

    Thanks in advance.

  • #2
    Pls recommend other solutions as well.