Reputation: 18770
For Grails 2.2.x -
I'd like to split Config.groovy into multiple files in the same grails-app/conf folder.
Is that possible?
I am aware of grails.config.locations, but that doesn't seem to work all that well - I have to put the files in src/java for them to be picked up in the classpath, and they don't refresh in development unless I restart
Upvotes: 2
Views: 1559
Reputation: 122364
You can put Class
objects into grails.config.locations
:
grails.config.locations = [ConfigOne, ConfigTwo]
This would load configuration from ConfigOne.groovy
and ConfigTwo.groovy
(which could be in grails-app/conf
or in src/groovy
), and you can mix and match this style with the normal runtime-parsed .groovy
and .properties
external configs.
I don't know whether these files will get reloaded in dev mode though.
Upvotes: 8