How to access Grails configuration in Grails 2.0?

If you need it in an artifact that supports dependency injection, simply inject grailsApplication class MyController { def grailsApplication def myAction = { def bar = grailsApplication.config.my.property } } If you need it in a bean in, say, src/groovy or src/java, wire it up using conf/spring/resources.groovy // src/groovy/com/example/MyBean.groovy class MyBean { def grailsApplication def foo() … Read more