databaseproperty.java

来自「一个Java持久层类库」· Java 代码 · 共 36 行

JAVA
36
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package ActiveObject.core;import java.io.FileInputStream;import java.io.IOException;import java.util.Properties;import java.util.logging.Level;import java.util.logging.Logger;/** * * @author tanjiazhang */public class DataBaseProperty {    private static java.util.Properties properties = null;    static    {        properties = new Properties();        try {            properties.load(new FileInputStream("database.ini"));        } catch (IOException ex) {            Logger.getLogger(DataBaseProperty.class.getName()).log(Level.SEVERE, null, ex);        }    }    public static final String getProperty(String key)    {        return properties.getProperty(key);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?