I am using Spring to display messages from a properties file. I would like to be able to override the <spring:message> tag to use a value from a database based on the logged in user. If this value is not present I would like it to default to the value currently in the properties file as it does now.
Can someone help me with this code? I’ve read about AbstractMessageSource but I am unclear on how to implement it.
Thanks
You have to implement custom message source. It’s a class that extends
AbstractMessageSourceand implements the abstractresolveCode(java.lang.String, java.util.Locale)method. There is almost same question on SO (it’s solution for Grails), but I think it is good point to start from…