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;
} }