, , . Grails 2.4.4. mytest myqa, BOTH Grails, Environment.CUSTOM, , bean !
grails.util.Environment.executeForCurrentEnvironment {
development {
println 'Running in DEV mode.'
}
mytest {
println 'This will be evaluated because it is CUSTOM'
}
myqa {
println 'This will ALSO be evaluated because it is CUSTOM. Yikes!'
}
}
, . , , :
switch(Environment.current.name) {
case 'development':
println 'Running in DEV mode.'
break
case 'mytest':
println 'Running in mytest mode'
break
case 'myqa':
println 'Running in myqa mode'
break
}