public class NacosEnvs extends Object
| 构造器和说明 |
|---|
NacosEnvs() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Boolean |
getBoolean(String key)
get boolean, if the value can not be got by the special key, the null will be returned.
|
static Boolean |
getBoolean(String key,
Boolean defaultValue)
get boolean, if the value can not be got by the special key, the default value will be returned.
|
static Integer |
getInteger(String key)
get integer, if the value can not be got by the special key, the null will be returned.
|
static Integer |
getInteger(String key,
Integer defaultValue)
get integer, if the value can not be got by the special key, the default value will be returned.
|
static Long |
getLong(String key)
get long, if the value can not be got by the special key, the null will be returned.
|
static Long |
getLong(String key,
Long defaultValue)
get long, if the value can not be got by the special key, the default value will be returned.
|
static String |
getProperty(String key)
get property, if the value can not be got by the special key, the null will be returned.
|
static String |
getProperty(String key,
String defaultValue) |
static void |
init(Properties properties)
init environment.
|
public static void init(Properties properties)
properties - propertiespublic static String getProperty(String key)
key - special keypublic static Boolean getBoolean(String key)
key - special keypublic static Boolean getBoolean(String key, Boolean defaultValue)
key - special keydefaultValue - default valuepublic static Integer getInteger(String key)
key - special keypublic static Integer getInteger(String key, Integer defaultValue)
key - special keydefaultValue - default valuepublic static Long getLong(String key)
key - special keyCopyright © 2018–2022 Alibaba Group. All rights reserved.