wangting
2024-12-30 306a9c4fde94c54d91aee5a69d59b993c7c707a1
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
35
36
37
38
39
40
package com.vci.client.workflow.commom;
 
import java.io.InputStream;
import java.util.Properties;
 
import com.vci.client.workflow.editor.ui.TaskNewPanel;
import com.vci.client.common.ClientLog4j;
 
public class FlowCustomProperties {
 
    private static String fileName = "flow-custom.properties";
    
    private static Properties properties = null;
    
    static {
        properties = new Properties();
        try {
            ClassLoader cl = TaskNewPanel.class.getClassLoader();
            InputStream in = cl.getResourceAsStream(fileName);
            properties.load(in);
        } catch (Exception ee) {
            ClientLog4j.logger.info("初始化工作流客户化配置文件出错,请检查文件后重新启动");
        }
    }
    
    public static String getStrPro(String key) {
        String value = "";
        try {
            value = (String) properties.get(key);
        } catch (Exception e) {
            e.printStackTrace();
        }
        
        if (value == null) {
            value = "";
        }
        
        return value;
    }
}