|
|
|
@ -11,7 +11,7 @@ import java.util.Map;
|
|
|
|
|
public class TestEnvUtil {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 不会覆盖原有的配置,在高优先级的环境配置文件上Put
|
|
|
|
|
* 不会覆盖原有的配置,在高优先级的环境配置文件上进行修改
|
|
|
|
|
* 方便后面remove就可以放开原有的配置参数
|
|
|
|
|
*
|
|
|
|
|
* @param name
|
|
|
|
@ -63,7 +63,10 @@ public class TestEnvUtil {
|
|
|
|
|
* 删除暂存的配置变量
|
|
|
|
|
* @param name
|
|
|
|
|
*/
|
|
|
|
|
public static void removeProperty(String name) throws Exception {
|
|
|
|
|
getModifiableEnvironment().remove(name);
|
|
|
|
|
public static void removeProperty(String... name) throws Exception {
|
|
|
|
|
Map<String, String> modifiableEnvironment = getModifiableEnvironment();
|
|
|
|
|
for (String nm : name) {
|
|
|
|
|
modifiableEnvironment.remove(nm);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|