63. Properties & configuration
The Spring Environment
has an API for this, but normally you would set a System profile (spring.profiles.active
) or an OS environment variable (SPRING_PROFILES_ACTIVE
). E.g. launch your application with a -D
argument (remember to put it before the main class or jar archive):
$ java -jar -Dspring.profiles.active=production demo-0.0.1-SNAPSHOT.jar
Read full article from 63. Properties & configuration
No comments:
Post a Comment