PropertiesAgent加强注释
This commit is contained in:
@@ -23,14 +23,31 @@ public abstract class PropertiesAgent {
|
||||
|
||||
public static final String PROP_NAMESPACE_APPLICATION = "application";
|
||||
|
||||
/**
|
||||
* 编译时进行的操作
|
||||
*
|
||||
* @param conf 节点配置
|
||||
*/
|
||||
public void compile(AnyValue conf) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化配置源,配置项需要写入appProperties,并监听配置项的变化
|
||||
*
|
||||
* @param factory 依赖注入资源工厂
|
||||
* @param appProperties 全局property.开头的配置项
|
||||
* @param conf 节点配置
|
||||
*/
|
||||
public abstract void init(ResourceFactory factory, Properties appProperties, AnyValue conf);
|
||||
|
||||
/**
|
||||
* 销毁动作
|
||||
*
|
||||
* @param conf 节点配置
|
||||
*/
|
||||
public abstract void destroy(AnyValue conf);
|
||||
|
||||
protected String getKeyResourceName(String key) {
|
||||
return key.startsWith("property.") ? key : ("property." + key);
|
||||
return key.startsWith("system.property.") || key.startsWith("property.") ? key : ("property." + key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -839,6 +839,7 @@ public final class ResourceFactory {
|
||||
this.elements = new CopyOnWriteArrayList<>();
|
||||
}
|
||||
|
||||
//wrappers=null时才会触发listener的ResourceChangeEvent事件
|
||||
public ResourceEntry(final String name, T value, final List<ResourceElement> elements, List<ResourceChangeWrapper> wrappers, boolean sync) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
|
||||
Reference in New Issue
Block a user