public class SSOProperties extends Object
Properties 辅助工具类
| 构造器和说明 |
|---|
SSOProperties(Properties properties) |
SSOProperties(Properties mergeProperties,
String runMode) |
SSOProperties(Properties mergeProperties,
String runMode,
String currentMode) |
| 限定符和类型 | 方法和说明 |
|---|---|
static Properties |
extractRunMode(Properties prop,
String runMode)
properties 提取当前模式配置
--------------------
dev_mode 开发模式
test_mode 测试模式
online_mode 生产模式
--------------------
eclipse 开发模式配置,启动参数 Arguments 属性 VM
arguments 设置 -Dsso.run.mode=dev_mode
|
static Properties |
extractRunMode(Properties prop,
String runMode,
String defaultMode)
properties 提取当前模式配置
|
String |
findValue(String... keys) |
String |
get(String key) |
String |
get(String key,
String defaultVal) |
boolean |
getBoolean(String key,
boolean defaultVal) |
double |
getDouble(String key,
double defaultVal) |
<T extends Enum<T>> |
getEnum(String key,
Class<T> type,
T defaultValue) |
int |
getInt(String key,
int defaultVal) |
long |
getLong(String key,
long defaultVal) |
public SSOProperties(Properties properties)
public SSOProperties(Properties mergeProperties, String runMode)
public SSOProperties(Properties mergeProperties, String runMode, String currentMode)
public static Properties extractRunMode(Properties prop, String runMode)
public static Properties extractRunMode(Properties prop, String runMode, String defaultMode)
properties 提取当前模式配置
prop - 配置文件 PropertiesrunMode - 当前配置模式defaultMode - 默认模式public boolean getBoolean(String key, boolean defaultVal)
public long getLong(String key, long defaultVal)
public int getInt(String key, int defaultVal)
public double getDouble(String key, double defaultVal)
Copyright © 2016. All rights reserved.