On the command line I specify --spring.active.profiles=A
at the top of /application.yml I specify spring.profiles.active: B
Environment.getActiveProfiles() returns A
But yml files that have profile B as active get loaded instead of A.
If I specify new SpringApplicationBuilder().profiles("C") in addition to the above.
Environment.getActiveProfiles() returns A,C
And C is getting loaded. Which would be my expectation.