public class PropertySource extends LogSupport
logger| 限定符 | 构造器和说明 |
|---|---|
protected |
PropertySource(String configFile,
Class<?> callerClass)
新建Properties文件数据源
|
protected PropertySource(String configFile, Class<?> callerClass) throws IOException
configFile - Properties文件路径,具体搜索规则参考Class.getResource(java.lang.String)callerClass - 调用者的Class,用来确定搜索位置IOException - config file cannot be foundpublic Object getProperty(String key) throws PropertyNotFoundException
Copyright © 2017. All rights reserved.