Let's say, you have the config.groovy file as follow.
...........
..........
environments {
production {
myVariable1="I am variable1 on RPOD"
myVariable1="I am variable1 on RPOD"
}
development {
myVariable1="I am variable1 on DEV"
myVariable1="I am variable1 on RPOD"
}
log4j {
appender.stdout = "org.apache.log4j.ConsoleAppender"
.........
........
Now the above varaible can be easily access through any of the controller as follow.
def config = ConfigurationHolder.config
def myVaraible1 = config.myVaraible1
def myVaraible2 = config.myVaraible2