jbossサーバーを再起動しなくても、プロパティファイルの変更を有効にします。私は、サーバーを再起動するまで、コードのjbossを再起動しないプロパティファイルの再ロード
私の作品は、この
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
public class Myclass{
private static PropertiesConfiguration configure;
try {
configure = new PropertiesConfiguration("MyProperties.properties");
configure.setReloadingStrategy(new FileChangedReloadingStrategy());
configure.setAutoSave(true);
} catch (ConfigurationException e) {
e.printStackTrace();
}
}
しかし、これは動作しないように書きます。
誰でも私を助けることができますか?
ありがとうございます!
ここで、これらのクラスは、 'PropertiesConfiguration'?私が知っている限り、それはJDKの一部ではありません... – home
私はこれらの3つのインポートステートメントをトップに持っています – Hawks