Reputation: 1196
I cant find an example that shows how to specify a directory in Config.groovy which will be called in any part of the application. The said directory will serve as a repository for the files that will be generated by the application.
Any help from you guys will be highly appreciated.
Upvotes: 0
Views: 251
Reputation: 35864
If you have the following in Config.groovy:
my.app.location="/Some/Path"
You can access this via the injectable grailsApplication like so:
def SomeController {
def grailsApplication
def someAction() {
def location = grailsApplication.config.my.app.location
}
}
Same applies to Services, Taglibs, etc.
Upvotes: 1