public static Properties loadConfig()

in src/main/java/com/aliyuncs/kms/secretsmanager/client/utils/ConfigUtils.java [15:35]


    public static Properties loadConfig(String configName) {
        File file = getFileByPath(configName);
        Properties properties = new Properties();
        if (file == null) {
            try (InputStream in = ConfigUtils.class.getClassLoader().getResourceAsStream(configName)) {
                if (in == null) {
                    return null;
                }
                properties.load(in);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        } else {
            try (InputStream in = new FileInputStream(file)) {
                properties.load(in);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return properties;
    }