com.orion.spring.EnvProperties Maven / Gradle / Ivy
package com.orion.spring;
import com.orion.lang.define.Console;
import com.orion.lang.define.collect.MutableHashMap;
import com.orion.lang.define.collect.MutableHashSet;
import com.orion.lang.utils.Exceptions;
import com.orion.lang.utils.ext.PropertiesExt;
import org.springframework.beans.factory.InitializingBean;
import java.util.Properties;
/**
* maven 多环境配置
*
* @author Jiahang Li
* @version 1.0.0
* @since 2020/3/5 23:22
*/
public class EnvProperties {
/*
pom.xml
src/main/java/com/orion/filter/${env}.properties
src/main/resources
true
application.xml
resources根目录
*/
/**
* 配置文件
*/
private static PropertiesExt propertiesExt;
private EnvProperties() {
}
public static String getValue(String key) {
return propertiesExt.getValue(key);
}
public static String getValue(String key, String def) {
return propertiesExt.getValue(key, def);
}
public static MutableHashMap