package com.lightinit.hsdataportal.dictionary;

import java.io.*;
import java.util.LinkedHashMap;
import java.util.Properties;

public class DicGitToken {

    public static String AUTHORIZATION;

    public static String URL;

    public static String PARAMS;

    //静态读取配置文件
    static{
        InputStream stream =null;
        try {
            stream=DicGitToken.class.getClassLoader().getResourceAsStream("synchron.properties");
            Properties properties = new Properties();
            properties.load(stream);
            AUTHORIZATION=properties.getProperty("authorization");
            URL=properties.getProperty("url");
            PARAMS=properties.getProperty("params");
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if(stream!=null){
                try {
                    stream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }


    /*public static final String AUTHORIZATION = "Basic bm9raWE6bm9raWE=" ;

    public static final String URL = "https://39.96.36.75:9666/microservice-gateway/msgs-auth/oauth/token" ;

    public static final String PARAMS = "grant_type=password&username=admin&password=hB6f4hZyWNj0h4boFy7E5l3pt8CL%2BTCI7ifwKF5UKo52GFe19ObDGoVFrv3aszrYX3k5tZ5j3gwl%2BnY0Q2Eyb3tQACa8pHCOGsx1s4z1msJ88LtJpQ9gycfSYT3uVP4WCNa6VK3OmKvUMITJRz3VqEYoVspk3DMjBRXxJ5JxCmM%3D" ;

    private static LinkedHashMap<String, String> dicMap = null;

    private DicGitToken(){
        dicMap = new LinkedHashMap<String, String>();
        dicMap.put(AUTHORIZATION, AUTHORIZATION);
        dicMap.put(URL, URL);
        dicMap.put(PARAMS, PARAMS);
    }*/

}
