In migrating from xml defined configuration java defined configuration, it is not possible to load xml and .class configurations in arbitrary orders. This makes mixing the two somewhat impossible and forces us to stay with the xml configurations. In our case, our xml configs are huge, and migrating them all at once isn't desired.
The below is the desired configuration. The PropertiesConfig is loaded first, as it loads all property placeholders for use in all of the xml files.
At the end, I'd like to add a MongoConfig.class to add more mongo-spring-data defined beans within the application that reference the beans defined in applicationContext-mongo.xml.
Unfortunately, I can't order the loading of configuration classes between xml and .class files - I have to either load all class files first then all xml files, or load all xml files first, then all class files.
The implementation below gives me the error: "Duplicate annotation of non-repeatable type @Import"
public class CoreConfig
Please allow spring to have ordered loading of configuration files wheather they are xml or .class configurations by making the Import annotations repeatable, or provide another solution.