1、smsHandler兼容hades规则引擎

2、graylog 配置名修改
pull/32/head
3y 2 years ago
parent 4d15529703
commit 709c73064a

@ -22,6 +22,7 @@ import com.java3y.austin.support.service.ConfigService;
import com.java3y.austin.support.utils.AccountUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import java.util.*;
@ -46,7 +47,7 @@ public class SmsHandler extends BaseHandler implements Handler {
private ConfigService config;
@Autowired
private Map<String, SmsScript> smsScripts;
private ApplicationContext applicationContext;
@Autowired
private AccountUtils accountUtils;
@ -75,7 +76,7 @@ public class SmsHandler extends BaseHandler implements Handler {
for (MessageTypeSmsConfig messageTypeSmsConfig : messageTypeSmsConfigs) {
smsParam.setScriptName(messageTypeSmsConfig.getScriptName());
smsParam.setSendAccountId(messageTypeSmsConfig.getSendAccount());
List<SmsRecord> recordList = smsScripts.get(messageTypeSmsConfig.getScriptName()).send(smsParam);
List<SmsRecord> recordList = applicationContext.getBean(messageTypeSmsConfig.getScriptName(), SmsScript.class).send(smsParam);
if (CollUtil.isNotEmpty(recordList)) {
smsRecordDao.saveAll(recordList);
return true;

@ -118,5 +118,5 @@ server.shutdown=graceful
########################################## system end ##########################################
########################################## log start ##########################################
austin.grayLog.ip=${austin.graylog:austin-graylog}
austin.graylog.ip=${austin.graylog:austin-graylog}
########################################## log end ##########################################
Loading…
Cancel
Save