ludc
2024-12-04 e405b861b9521f5ea38c5402203a5b05988f9de2
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
package com.vci.web.config;
 
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
 
/**
 * corba配置文件读取
 * @author ludc
 * @date 2024/6/28 23:11
 */
public class ConfigCorbaReader {
 
    private static Properties properties;
 
    static {
        properties = new Properties();
        try (InputStream input = ConfigCorbaReader.class.getClassLoader().getResourceAsStream("properties/corba.properties")) {
            if (input == null) {
                System.err.println("Unable to find corba.properties");
            } else {
                properties.load(input);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 
    public static String getConfigValue(String key) {
        return properties.getProperty(key);
    }
 
}