Equivalent for application.yml (Spring)

In spring I have a configuration file application.yml, application-dev.yml, application-uat.yml, application-prod.yml, etc, and all environment inherit the application.yml, In lagon what woulds its equivalent be?

reference.conf + application-env.conf?

application.conf , plus additional .conf files for other environments.

For example if you look at the shopping-cart sample application there is an application.conf configuration file for each service implementation. That has all of the configuration needed. But you will also see a prod-application.conf file. The top line of prod configuration is include "application". This lets that prod configuration “inherit” from the base application.conf . You can also see in the deploy directory that all of the YAML files pass in the prod-application.conf to the startup. That way when you are locally testing on your laptop, you get the default application.conf, but when you deploy to production you get the production configuration (which inherits and overrides the base configuration).

But that’s just one way of doing it. Obviously you could have as many different configuration files as you wanted to support as many environments as you needed. And they could inherit as many different ways as you wanted, with as many levels of nesting as you wanted. You can also use environment variables to affect the configuration.

See the Config library docs for more information : https://github.com/lightbend/config

1 Like

Thanks @davidogren.