继续潜水

导航

 
package com.b2q.web_push.util;


import io.goeasy.GoEasy;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class GoEasyUtil {

    private static String regionHost; //服务商网址
    private static String appkey ;//官网appkey

    @Value("${regionHost}")
    public void setregionHost(String regionHost){
        GoEasyUtil.regionHost = regionHost;
    }
    public static String getregionHost() {
        return regionHost;
    }

    @Value("${appkey}")
    public void setappkey(String appkey){
        GoEasyUtil.appkey = appkey;
    }
    public static String getappkey() {
        return appkey;
    }
    private static class GoEasyUtil1
    {
        public final static GoEasy instance = new GoEasy(regionHost,appkey);
    }

    public static GoEasy getGoEasy()
    {
        return GoEasyUtil1.instance;
    }


}

 

posted on 2018-10-31 15:43  继续潜水  阅读(3620)  评论(0编辑  收藏  举报