Having spring bean properties refreshed automatically from properties file

前端 未结 5 1336
礼貌的吻别
礼貌的吻别 2020-12-30 15:45

I\'m using Spring 2.5.6. I have a bean whose properties are being assign from a property file via a PropertyPlaceholderConfigurer. I\'m wondering whether its possible to ha

5条回答
  •  再見小時候
    2020-12-30 16:18

    Might also look into useing Spring's PropertyOverrideConfigurer. Could re-read the properties and re-apply it in some polling/schedular bean.

    It does depend on how the actual configured beans use these properties. They might, for example, indirectly cache them somewhere themself.

提交回复
热议问题