I have a Spring Boot application with several Java Config classes. Each class has its own @Profile
name. When running the application from Eclipse with the Program Arguments set to
--spring.profiles.active=config1,config2
the server runs as expected with all beans from both Config classes running.
But when I try to start the application from the command line with --spring.profiles...
only one of the profiles' beans are running, and the order doesn't matter. It is only the alphabetically last profile that is running. Even though the log says
The following profiles are active: config1,config2
Still none of the beans from config1
is kicking in.
Also tried to set spring.profiles.include
in the props file with the same result.
Any ideas?