在Spring中自动重新配置 [英] Automatic configuration reinitialization in Spring
问题描述
在Log4j中,有一个功能,可以初始化系统以进行配置和间隔监视.这样,只要更改属性文件,log4j系统就可以重新加载其属性. spring框架是否具有这样的配置观察者功能,即在更改配置时会重新加载配置.需要重新加载的配置不是Springs的applicationContext.xml,而是使用Spring初始化bean初始化的各种其他配置文件.
In Log4j, there is a feature wherein the system can be initialized to do a configure and watch with an interval. This allows for the log4j system to reload its properties whenever the property file is changed. Does the spring framework have such a Configuration Observer facility wherein the Configuration is reloaded when it changed. The Configuration that needs reloading is not the Springs's applicationContext.xml but various other configuration files that are initialized using the Spring initialization beans.
推荐答案
I found a utility that does something similar to Log4J here. It's basically an extension to PropertyPlaceholderConfigurer that reloads properties when they change.
这篇关于在Spring中自动重新配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!