How to reload properties with Spring?

前端 未结 6 912
甜味超标
甜味超标 2020-12-01 12:44

I\'m using properties file with Spring 3. When Spring initializes its contex it loads the properties file and puts it in all beans with @Value annotation.

I want to

6条回答
  •  时光说笑
    2020-12-01 13:27

    I would suggest replacing the java.util.Properties with a PropertiesConfiguration from the Apache Commons Configuration project. It supports automatic reloading, either by detecting when the file changes, or by triggering through JMX.

提交回复
热议问题