类 ConfigUtils
java.lang.Object
com.alibaba.ageiport.common.utils.ConfigUtils
-
方法概要
修饰符和类型方法说明static voidaddProperties(Properties properties) static intgetPid()static Propertiesstatic StringgetProperty(String key) static StringgetProperty(String key, String defaultValue) static StringgetSystemProperty(String key) System environment -> System propertiesstatic booleanstatic booleanstatic booleanisNotEmpty(String value) static PropertiesloadProperties(String fileName) static PropertiesloadProperties(String fileName, boolean allowMultiFile) static PropertiesloadProperties(String fileName, boolean allowMultiFile, boolean optional) Load properties file toPropertiesfrom class path.static StringreplaceProperty(String expression, Map<String, String> params) static voidsetProperties(Properties properties)
-
方法详细资料
-
isNotEmpty
-
isEmpty
-
isDefault
-
replaceProperty
-
getProperties
-
setProperties
-
addProperties
-
getProperty
-
getProperty
-
getSystemProperty
System environment -> System properties- 参数:
key- key- 返回:
- value
-
loadProperties
-
loadProperties
-
loadProperties
Load properties file toPropertiesfrom class path.- 参数:
fileName- properties file name. for example:dubbo.properties,METE-INF/conf/foo.propertiesallowMultiFile- iffalse, throwIllegalStateExceptionwhen found multi file on the class path.optional- is optional. iffalse, log warn when properties config file not found!s- 返回:
- loaded
Propertiescontent.- return empty Properties if no file found.
- merge multi properties file if found multi file
- 抛出:
IllegalStateException- not allow multi-file, but multi-file exist on class path.
-
getPid
public static int getPid()
-