Skip to content

Instantly share code, notes, and snippets.

View sbglasius's full-sized avatar

Søren Berg Glasius sbglasius

View GitHub Profile

External configuration in Grails 3


Working on Grails 3 I realized that I no longer can specify external configuration using the standard grails.config.locations property in Config.groovy file.

Reason is obvious! There is no Config.groovy now in Grails 3. Instead we now use application.yml to configure the properties. However, you can't specify the external configuration using this file too!

What the hack?

Now Grails 3 uses Spring's property source concept. To enable external config file to work we need to do something extra now.