I have to run a legacy spring boot (2.1.8) app
SpringApplication.run(MyApplication.class, args);
with XML beans config which must be selected at runtime from the src/main/resources
dir:
a/config.xml
or
b/config.xml
based on an env variable with the respective value a
or b
. Is there a way to load XML config like this?
Have you looked into Spring Profiles; this might get you where you want to be.