spring-boot-sample-yaml-config icon indicating copy to clipboard operation
spring-boot-sample-yaml-config copied to clipboard

System Property not working

Open HimalayFei opened this issue 9 years ago • 1 comments

Thank you for the sample app.

  1. It would be nice if you add how to run your application, I was able to run using "mvn spring-boot:run"
  2. 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?

HimalayFei avatar Mar 06 '15 18:03 HimalayFei

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 :( ).

hoserdude avatar Mar 28 '15 05:03 hoserdude