在Grails i18n插件defined thusly中定义了一个 messageSource
bean:
messageSource(PluginAwareResourceBundleMessageSource) {
basenames = baseNames.toArray()
fallbackToSystemLocale = false
pluginManager = manager
....
}
是否可以覆盖我的resources.groovy中的 fallbackToSystemLocale
值的配置,例如:
messageSource {
fallbackToSystemLocale = true
}
以上不起作用,我得到一个错误:“创建名为'messageSource'的bean时出错:Bean定义是抽象的”
1 回答
有没有理由不在
BootStrap.groovy
中简单地更新bean?如果要在运行BootStrap之前修改bean,可以使用this blog post,如this blog post .
SRC /常规/ yourpkg / CustomBeanPostProcessor:
resources.groovy: