System Property not working
Opened this issue · 1 comments
HimalayFei commented
Thank you for the sample app.
- It would be nice if you add how to run your application, I was able to run using "mvn spring-boot:run"
- I created a folder and added to the classpath. In that folder I have put the same application.yml and ran this command "mvn spring-boot:run -Dspring.profiles.active=unit-test" but it still picking up the "default" active profile from the source code application.yml. I also tried creating a application.properties instead of application.yml but it still didnt get picked up?
hoserdude commented
I was able to run both java -Dspring.profiles.active=unit-test -jar target/spring-boot-sample-yaml-config-1.0.0.jar
and mvn spring-boot:run -Dspring.profiles.active=unit-test
from the command line. I just updated the Spring Boot version to 1.2.0, try it now and let me know if that works for you or not. The unit test profile was picked up by both (and no Doge was shown :( ).