public abstract class AbstractPropertiesLoader extends java.lang.Object implements Loadable
这个抽象类用于加载 .properties 文件
子类需要实现 loadProperties() 方法继而完善工作
This class is used to load .properties file
Subclass should override loadProperties() method
Email: fishinlove@163.com
created by 2019/03/28 15:35:30
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractPropertiesLoader() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
load()
加载资源,主要是配置文件
返回一个 Map 集合,键值就是 key,而 value 就是键值对应的属性值
Load resources
Return a Map Collection, the key is the key, and the value is the attribute of the key
|
protected abstract java.util.Properties |
loadProperties()
这个方法留给子类实现
这里不管子类从哪里获取 Properties,只要保证能获得就行了
This method is abstract, its subclass should implement
|
protected abstract java.util.Properties loadProperties()
throws java.io.IOException
这个方法留给子类实现
这里不管子类从哪里获取 Properties,只要保证能获得就行了
This method is abstract, its subclass should implement
返回一个 Properties 对象
Return a Properties instance
java.io.IOException - 如果加载过程出错,比如文件找不到,流创建失败等都有可能导致这个异常
If loading has error or file not found, even inputStream created failed causes this exception
public java.util.Map<java.lang.String,java.lang.String> load()
throws java.io.IOException
Loadable加载资源,主要是配置文件
返回一个 Map 集合,键值就是 key,而 value 就是键值对应的属性值
Load resources
Return a Map Collection, the key is the key, and the value is the attribute of the key
Copyright © 2019. All Rights Reserved.