plalloni wrote
I'm currently trying to do something like this:
domain:
class SomeDomain {
// ... properties
static mapping = {
table name: "blabla" + SomeConfig.bla()
}
}
and in src/groovy:
class SomeConfig {
static bla() {
return ConfigurationHolder.getConfig().some.bla.bla.bla
}
}
While this work well when "some.bla.bla.bla" is set in some config, I can't find a way to abort execution (or report error throwing exception) when that setting is not specified.... apparently ConfigurationHolder.getConfig().some.bla.bla.bla returns some string...
Any pointer on how to do this reliably?
Just for the record, the string returned sometimes is "[:]" and sometimes is "{}", but I'm not even able, somehow, to check for those values.