Spring boot yml ResourceBundle file

前端 未结 2 601
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-04 05:21

I\'m using MessageSource of Spring to load errors messages from a .properties file in classpath. My properties respect a certain \"template\" such

2条回答
  •  失恋的感觉
    2021-01-04 06:21

    The best solution I managed to find was found before me by @vtosh: to use this library. The only problem (but still) is that it is not popular enough.

    The other option could be to extend Java localization support manually extending the ResourceBundle.Control class (you can find an official example here). But I don't see much sense in it since the library @vtosh found uses this approach.

    Why there is no a solution for Spring? Well, the answer you can find in this jira. It is still in Open state so I don't expect to be any solution from their side at least for now.

提交回复
热议问题