Override Spring:message tag with database values

后端 未结 3 1975
小蘑菇
小蘑菇 2020-12-09 12:38

I am using Spring to display messages from a properties file. I would like to be able to override the tag to use a value from a database

3条回答
  •  感情败类
    2020-12-09 13:10

    You have to implement custom message source. It's a class that extends AbstractMessageSource and implements the abstract resolveCode(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...

提交回复
热议问题