📄 propertiestonicpropertymanager.java
字号:
package com.opensymphony.tonic.impl;
import com.opensymphony.tonic.TonicPropertyManager;
import com.opensymphony.tonic.util.ClassLoaderUtils;
import java.util.Properties;
import java.io.IOException;
public class PropertiesTonicPropertyManager implements TonicPropertyManager
{
public final static String DEFAULT_FILE = "tonic.properties";
Properties props = null;
public PropertiesTonicPropertyManager() throws IOException
{
this(DEFAULT_FILE);
}
public PropertiesTonicPropertyManager(String propFile) throws IOException
{
Properties props = new Properties();
props.load(ClassLoaderUtils.getResourceAsStream(propFile, getClass()));
init(props);
}
public PropertiesTonicPropertyManager(Properties props)
{
init(props);
}
private void init(Properties props)
{
this.props = props;
}
public String getProperty(String key)
{
return props.getProperty(key);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -