mitao
2024-08-14 07057a9a0c8624ec1876670e69b0631b1213793f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.ruoyi.order.util;
 
import java.io.IOException;
import java.util.Properties;
 
/**
 * 配置信息
 *
 * @version 1.0
 */
public class ParamUtil {
 
    /**
     * 获取配置信息
     */
    private static Properties properties = new Properties();
    static{
        try {
            //获取properties文件
            properties.load(ParamUtil.class.getClassLoader().getResourceAsStream("conf/param.properties"));
        } catch (IOException e) {e.printStackTrace();}
    }
    
    /**
     * 获取配置参数值
     * 
     * @param key
     * @return
     */
    public static String getValue(String key){        
        return (String)properties.get(key);
    }
    
}