I have a Spring project which uses another project. Each project has its own spring profile initialize from java code using applicationContext.xml
and *.properties
for each profile. I inject the profile from args[]
. The problem is that second project uses the default configuration for the env from the applicationContext.xml
I can not inject the env from args[]
to the second project and I tried looking for an article which will explain how Spring profile works.
applicationContext.xml
?applicationContext.xml
configuration?Articles on that subject or even examples would be most appreciated!! Thanks in advance.
SPRING_PROFILES_ACTIVE is the environment variable to override/pick Spring profile