My name is Matteo and I'm a cloud solution architect and tech enthusiast. In my spare time, I work on open source software as much as I can. I simply enjoy writing software that is actually useful.
The way we usually go with Spring Boot is having a different application.yml(but it's the same with .properties) for every environment and switch them by passing the CLI parameter or via the SPRING_PROFILES_ACTIVE environment variable (very useful for containers).
So we have normally four files:
application.yml: base common configuration
application-dev.yml: local dev configuration, not committed to git and customized by every dev
application-test.yml: test server configuration
application-prod.yml: production server configuration
Optionally we could have more for specific use cases (e.g. in a project we have an application-openshift.yml for deploy on our Red Hat OpenShift PaaS).
The way we usually go with Spring Boot is having a different
application.yml
(but it's the same with.properties
) for every environment and switch them by passing the CLI parameter or via theSPRING_PROFILES_ACTIVE
environment variable (very useful for containers).So we have normally four files:
application.yml
: base common configurationapplication-dev.yml
: local dev configuration, not committed to git and customized by every devapplication-test.yml
: test server configurationapplication-prod.yml
: production server configurationOptionally we could have more for specific use cases (e.g. in a project we have an
application-openshift.yml
for deploy on our Red Hat OpenShift PaaS).Thanks for the information guys, seems like passing them as a CLI parameter will be the best option for us!