How to reload resource bundle in web application?

前端 未结 3 1082
臣服心动
臣服心动 2020-12-03 08:45

I have resource bundle as Java class that read values from database. When i update db i need to reload bundle, but i don\'t know how. Anybody helps ?

package         


        
3条回答
  •  执笔经年
    2020-12-03 09:27

    ResourceBundle.clearCache();     
    

    OR

    Messages_en .clearCache();
    

    Calling this method will reload the resources, it will refresh the bundle

    • Reference

提交回复
热议问题