📄 propertymgr.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.shopping.util;import java.io.IOException;import java.util.Properties;/** * * @author ruirui */public class PropertyMgr {private static Properties props = new Properties(); static { try { props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("resoure/shopping.properties")); } catch (IOException e1) { e1.printStackTrace(); } } public static String getProps(String key) { return props.getProperty(key); } private PropertyMgr() {} //测试语句 //public static void main(String[] args){// System.out.println(getProps("dbName")); //} }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -