package com.malk.huagao.config;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class KDWebApiConfig {
    private Properties properties = new Properties();

    public KDWebApiConfig(String filePath) throws IOException {
        try (FileInputStream input = new FileInputStream(filePath)) {
            properties.load(input);
        }
    }

    public String getProperty(String key) {
        return properties.getProperty(key);
    }

    public static void main(String[] args) {
        try {
            KDWebApiConfig config = new KDWebApiConfig("mjava-huagao/src/main/resources/application-dev.yml");
            System.out.println("AcctID: " + config.getProperty("X-KDApi-AcctID"));
            // 打印其他属性...
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
