如何在Java中从DB加载资源包消息?
Can I load a resource bundle dynamically? Can I edit a resource bundle dynamically?
It would be best if I can have such a logical resource bundle (i.e. located in context not as physical file).
Related:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否能够覆盖 ListResourceBundle ?它提供了一个扩展点,用于添加您自己的
Object[][]
资源密钥对。来自 javadoc:
此示例返回一个硬编码列表,但您可以修改它以从数据库或其他任何内容返回您想要的任何内容。
Would you be able to override the ListResourceBundle? It provides an extension point for adding in your own
Object[][]
of resource key pairs.From the javadoc:
This example returns a hard coded listing but you can modify that to return whatever you want from a database or anything else.