Is there a way to do what the file does Config.groovy, but at runtime ...
Something like:
class AController {
def method () {
withEnvironments {
development {
println 'This is execute just on development'
}
production {
log.debug 'This is execute just on production'
}
}
}
}
I know that I can achieve the same effect using if (Environment.current == 'development'), but is there anything with this sintax ???
source
share