Download ResourceBundle via HTTP?

I have a requirement to download text labels from our CMS. Content is displayed in a standard property file format. CMS works as a kind of RESTful web service provider, rather than pushing files, so I will need to pull property files on demand. I naively hoped that if I create a reloadable BundleMessageSource and set the base name for the file URL minus the locale parameter, this will work like magic, but apparently this is not the case. Can anyone suggest an approach to this? Is there a ready-made solution in Spring or is there some kind of class that I will need to extend?

+5
source share
1 answer

So the scaffman’s comment was correct. My web service just expected the locale to be as a GET parameter (locale = en_US), but would get the file suffix (i.e., locale = _en_US.properties). Thus, it was just shedding excess material from the param, and in fact it works great.

+1
source

All Articles