PropertyMgr.java
资源名称:JAVAshop.rar [点击查看]
上传用户:sxychgz
上传日期:2019-04-21
资源大小:4772k
文件大小:0k
源码类别:
电子政务应用
开发平台:
Java
- package com.bjsxt.shopping.util;
- import java.io.IOException;
- import java.util.Properties;
- public class PropertyMgr {
- static Properties props = new Properties();
- static {
- try {
- props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config/shopping.properties"));
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
- private PropertyMgr() {};
- public static String getProperty(String key) {
- return props.getProperty(key);
- }
- }