Is is possible to modify text in message.properties when in production without a redeploy/restart.
It's quite possible, but you need to replace the default messageSource bean with a ReloadableResourceBundleMessageSource. You can do this by configuring a new messageSource bean definition in your grails-app/conf/spring/resources.groovy as follows:
beans = {
messageSource(org.springframework.context.support.ReloadableResourceBundleMessageSource) {
basenames = ["classpath:grails-app/i18n/myApp", "file:grails-app/i18n/messages", "WEB-INF/grails-app/i18n/messages"]
}
}
The above will work in both development and production. You may also want to research other options available to you using the ReloadableResourceBundleMessageSource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With