类 NacosEnvs
- java.lang.Object
-
- com.alibaba.nacos.client.env.NacosEnvs
-
public class NacosEnvs extends java.lang.Objectenvironment utils.- 作者:
- onewe
-
-
字段概要
字段 修饰符和类型 字段 说明 private static NacosEnvironmentENVIRONMENT
-
构造器概要
构造器 构造器 说明 NacosEnvs()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static java.lang.BooleangetBoolean(java.lang.String key)get boolean, if the value can not be got by the special key, the null will be returned.static java.lang.BooleangetBoolean(java.lang.String key, java.lang.Boolean defaultValue)get boolean, if the value can not be got by the special key, the default value will be returned.static java.lang.IntegergetInteger(java.lang.String key)get integer, if the value can not be got by the special key, the null will be returned.static java.lang.IntegergetInteger(java.lang.String key, java.lang.Integer defaultValue)get integer, if the value can not be got by the special key, the default value will be returned.static java.lang.LonggetLong(java.lang.String key)get long, if the value can not be got by the special key, the null will be returned.static java.lang.LonggetLong(java.lang.String key, java.lang.Long defaultValue)get long, if the value can not be got by the special key, the default value will be returned.static java.lang.StringgetProperty(java.lang.String key)get property, if the value can not be got by the special key, the null will be returned.static java.lang.StringgetProperty(java.lang.String key, java.lang.String defaultValue)static voidinit(java.util.Properties properties)init environment.
-
-
-
字段详细资料
-
ENVIRONMENT
private static final NacosEnvironment ENVIRONMENT
-
-
方法详细资料
-
init
public static void init(java.util.Properties properties)
init environment.- 参数:
properties- properties
-
getProperty
public static java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
-
getProperty
public static java.lang.String getProperty(java.lang.String key)
get property, if the value can not be got by the special key, the null will be returned.- 参数:
key- special key- 返回:
- string value or null.
-
getBoolean
public static java.lang.Boolean getBoolean(java.lang.String key)
get boolean, if the value can not be got by the special key, the null will be returned.- 参数:
key- special key- 返回:
- boolean value or null.
-
getBoolean
public static java.lang.Boolean getBoolean(java.lang.String key, java.lang.Boolean defaultValue)get boolean, if the value can not be got by the special key, the default value will be returned.- 参数:
key- special keydefaultValue- default value- 返回:
- boolean value or defaultValue.
-
getInteger
public static java.lang.Integer getInteger(java.lang.String key)
get integer, if the value can not be got by the special key, the null will be returned.- 参数:
key- special key- 返回:
- integer value or null
-
getInteger
public static java.lang.Integer getInteger(java.lang.String key, java.lang.Integer defaultValue)get integer, if the value can not be got by the special key, the default value will be returned.- 参数:
key- special keydefaultValue- default value- 返回:
- integer value or default value
-
getLong
public static java.lang.Long getLong(java.lang.String key)
get long, if the value can not be got by the special key, the null will be returned.- 参数:
key- special key- 返回:
- long value or null
-
getLong
public static java.lang.Long getLong(java.lang.String key, java.lang.Long defaultValue)get long, if the value can not be got by the special key, the default value will be returned.- 参数:
key- special keydefaultValue- default value- 返回:
- long value or default value
-
-