public class AppConfigs extends Object
SERVER_CONFIG key in the
appconfig.xml| 限定符和类型 | 类和说明 |
|---|---|
static class |
AppConfigs.DEFAULT |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
get(String key) |
<T> T |
getBeanFromXML(String key,
Class<T> target) |
boolean |
getBoolean(String key) |
int |
getCacheSeconds()
数据缓存时间
|
AppConfigBean.Param |
getConfig(String key) |
static AppConfigs |
getInstance(String configfile)
获取AppConfigs实例
|
int |
getInt(String key) |
long |
getLong(String key) |
static Properties |
getResourceAsProperties(String file)
读取属性文件
|
static InputStream |
getResourceAsStream(String file) |
public static AppConfigs getInstance(String configfile)
configfile - JAR中配置文件路径public static InputStream getResourceAsStream(String file)
public static Properties getResourceAsProperties(String file)
file - 属性文件路径public int getInt(String key)
public long getLong(String key)
public boolean getBoolean(String key)
public AppConfigBean.Param getConfig(String key)
public int getCacheSeconds()
Copyright © 2015 cloudecho. All rights reserved.