1
votes

In Grails 3 and above there is an application.yml file where all configuration data are stored. The documentation isn't clear about setting environment specific config properties.

For instance, if I want a config property urlbase which point to different urls in dev, test and prod, how can I set it in the application.yml file?

I tried setting some environment specific properties however I was unsuccessful creating this environment specific properties.

Any help is appreciated.

1

1 Answers

2
votes

Try adding (adapting) to your application.yml these lines:

environments:
    development:
        urlBase: 'http://dev.com'
    test:
        urlBase: 'http://test.com'
    production:
        urlBase: 'http://prod.com'