类 ConfigUtils
-
- com.alibaba.dubbo.common.utils.ConfigUtils
-
public class ConfigUtils extends
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static void
properties)
static int
getPid()
static
getProperties()
static
key)
static
key, defaultValue)
static int
getServerShutdownTimeout()
static
key)
System environment -> System propertiesstatic boolean
value)
static boolean
value)
static boolean
value)
static
fileName)
static
fileName, boolean allowMultiFile)
static
fileName, boolean allowMultiFile, boolean optional)
Load properties file to from class path.static <>
<?> type, cfg, <> def)
Insert default extension into extension list.static
expression, <,> params)
static void
properties)
-
-
-
方法详细资料
-
isNotEmpty
public static boolean isNotEmpty( value)
-
isEmpty
public static boolean isEmpty( value)
-
isDefault
public static boolean isDefault( value)
-
mergeValues
public static <> mergeValues(<?> type, cfg, <> def)
Insert default extension into extension list.Extension list support
- Special value
default
, means the location for default extensions. - Special symbol
-
, means remove.-foo1
will remove default extension 'foo';-default
will remove all default extensions.
- 参数:
type
- Extension typecfg
- Extension name listdef
- Default extension list- 返回:
- result extension list
- Special value
-
replaceProperty
public static replaceProperty( expression, <,> params)
-
getProperties
public static getProperties()
-
setProperties
public static void setProperties( properties)
-
addProperties
public static void addProperties( properties)
-
getProperty
public static getProperty( key)
-
getProperty
public static getProperty( key, defaultValue)
-
getSystemProperty
public static getSystemProperty( key)
System environment -> System properties- 参数:
key
- key- 返回:
- value
-
loadProperties
public static loadProperties( fileName)
-
loadProperties
public static loadProperties( fileName, boolean allowMultiFile)
-
loadProperties
public static loadProperties( fileName, boolean allowMultiFile, boolean optional)
Load properties file to from class path.- 参数:
fileName
- properties file name. for example:dubbo.properties
,METE-INF/conf/foo.properties
allowMultiFile
- iffalse
, throw when found multi file on the class path.optional
- is optional. iffalse
, log warn when properties config file not found!s- 返回:
- loaded content.
- return empty Properties if no file found.
- merge multi properties file if found multi file
- 抛出:
- not allow multi-file, but multi-file exsit on class path.
-
getPid
public static int getPid()
-
getServerShutdownTimeout
public static int getServerShutdownTimeout()
-
-