|
|
package com.monitor.common.config;
|
|
|
|
|
|
import com.util.GetUsersInfoUtil;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
|
/**
|
|
|
* 告警任务的短信号码 Created by yoho on 2016/5/4.
|
|
|
*/
|
|
|
@Component("snsMobileConfig")
|
|
|
public class SnsMobileConfig {
|
|
|
public static final Logger logger = LoggerFactory.getLogger(SnsMobileConfig.class);
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
private GetUsersInfoUtil getUsersInfoUtil;
|
|
|
|
|
|
@Value("${base_mobile}")
|
|
|
private String baseMobile;
|
...
|
...
|
@@ -30,9 +41,49 @@ public class SnsMobileConfig { |
|
|
@Value("${java_api_error}")
|
|
|
private String javaApiError;
|
|
|
|
|
|
@Value("${bigdata_mobile}")
|
|
|
private String bigdataMobile;
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init(){
|
|
|
//大数据报警
|
|
|
bigdataMobile=getUsersInfoUtil.getMobileByAlarmGroup("大数据报警");
|
|
|
if(bigdataMobile==null){
|
|
|
bigdataMobile="";
|
|
|
}
|
|
|
|
|
|
/* //JAVAAPI错误报警
|
|
|
javaApiError =getUsersInfoUtil.getMobileByAlarmGroup("JAVAAPI错误报警");
|
|
|
if(javaApiError==null){
|
|
|
javaApiError="";
|
|
|
}
|
|
|
|
|
|
|
|
|
//JAVASERVICE错误报警
|
|
|
javaServiceMobile=getUsersInfoUtil.getMobileByAlarmGroup("JAVASERVICE错误报警");
|
|
|
if(javaServiceMobile==null){
|
|
|
javaServiceMobile="";
|
|
|
}
|
|
|
|
|
|
//REDIS异常报警
|
|
|
redisMobile=getUsersInfoUtil.getMobileByAlarmGroup("REDIS异常报警");
|
|
|
if(redisMobile==null){
|
|
|
redisMobile="";
|
|
|
}
|
|
|
|
|
|
//基础组
|
|
|
baseMobile=getUsersInfoUtil.getMobileByAlarmGroup("基础组");
|
|
|
if(redisMobile==null){
|
|
|
baseMobile="";
|
|
|
}*/
|
|
|
|
|
|
logger.info("初始化手机号码");
|
|
|
logger.info("JAVAAPI错误报警 javaApiError :"+javaApiError);
|
|
|
logger.info("大数据报警 bigdataMobile :"+bigdataMobile);
|
|
|
logger.info("JAVASERVICE错误报警 javaServiceMobile :"+javaServiceMobile);
|
|
|
logger.info("REDIS异常报警 redisMobile :"+redisMobile);
|
|
|
logger.info("基础组 baseMobile :"+baseMobile);
|
|
|
}
|
|
|
|
|
|
|
|
|
public String getBaseMobile() {
|
|
|
return baseMobile;
|
...
|
...
|
|