PropertyMgr.java
资源名称:Shopping.rar [点击查看]
上传用户:lsj999sz
上传日期:2022-06-15
资源大小:4717k
文件大小:0k
源码类别:
ICQ/即时通讯
开发平台:
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);
- }
- }