I really wanted to access only the settings in static utilities. After searching and reading most of the answers on SO, I came up with a simple solution (may be useful for someone):
Add owner class under src / groovy:
class StaticContext { static def app; }
initialize it at boot
class BootStrap { def grailsApplication def init = { servletContext -> StaticContext.app = grailsApplication } def destroy = { } }
And access to it in static utilities:
//In my case Solr URL in single ton def solrUrl = StaticContext.app.config.solr.url
source share