假设情况:
I have downloaded a Grails application from the web as a WAR file, foo.war
. In the documentation it says that I can put my own custom configuration in /foo.groovy
, because this path is included in grails.config.locations
in Config.groovy
. I can dump all my custom config in that one file and life is good.
How, here s my problem... The configuration for FooApp is big and hairy, and I don t want it all in one file. I would like to break it up into /bar.groovy
and /baz.groovy
to keep things organized. Is there a way to specify something in /foo.groovy
so that FooApp will also pick up /bar.groovy
and /baz.groovy
and process them?
I already tried appending paths to grails.config.locations
in /foo.groovy
, but Grails didn t like that and threw a nasty exception on startup. I m not sure what other approach to take.
明确:
grails-app/conf/Config.groovy
looks:
grails.config.locations = ["file:/foo.groovy"]
现在,如果不修改<条码>grails-app/conf/Config.groovy,而且只能通过修改<条码>/foo.groovy,是否可装上除<条码>/foo.groovy以外的更多集束文档?