当前位置:网站首页>Nail alarm tool
Nail alarm tool
2022-07-27 23:38:00 【Wind chime peak】
Build a group , Members of the group can add robots , The group administrator can modify all robots in the Group . Robots have corresponding Webhook, Send a message to this address , It can be displayed in the Group . The security setting direction information contains custom keywords 、 Add signature verification information to the address 、 Limit sent IP There are three ways of address segment .
ding:
url: Corresponding to Webhook Address
atMobiles:
Function name : @ List of mobile phone numbers of personnel , commas , You can see in the business cards of members in the Group , No +86-
@Slf4j
@Configuration
public class DingDingAlarmUtil {
@Value("${ding.url}")
private String url;
@Value("${spring.profiles.active}")
private String pretext;
private static DingTalkClient client;
private static String staticPretext;
@PostConstruct
public void init() {
client = new DefaultDingTalkClient(url);
staticPretext = String.format("[%s]", pretext);
}
public static void alarm(String content, String atMobiles) {
try {
OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text();
String time = TimeUtil.formatDateTime(LocalDateTime.now(), TimeUtil.TimeFormat.LONG_DATE_PATTERN_LINE);
// Content
text.setContent(staticPretext + time + "[ERROR]" + content);
OapiRobotSendRequest request = new OapiRobotSendRequest();
// Format
request.setMsgtype("text");
request.setText(text);
OapiRobotSendRequest.At at = new OapiRobotSendRequest.At();
String[] atMobileArray = atMobiles.replace(" ", "").split(",");
List<String> atMobileList = new ArrayList<>(Arrays.asList(atMobileArray));
// @ List of mobile phone numbers of personnel
at.setAtMobiles(atMobileList);
request.setAt(at);
client.execute(request);
} catch (Exception e) {
log.error("alarm error:", e);
}
}
}
边栏推荐
- Test article
- 【图像检测】基于Combined Separability Filter实现鼻孔和瞳孔等圆检测matlab源码
- 他山之石 | 蚂蚁超大规模知识图谱构建及应用
- 一位软件投资者的独白:我为什么不追逐快速增长的公司
- The total investment is 60billion! Foxconn semiconductor high-end package test project officially settled in Qingdao
- Calling dht11/22 temperature and humidity sensor in Proteus simulation Arduino
- proteus仿真arduino中调用DHT11/22温湿度传感器
- 使用灰度滤镜
- XML 外部实体 (XXE) 漏洞及其修复方法
- Apple releases new iPhone se: equipped with A13 bionic processor, priced from 3299 yuan
猜你喜欢
![[signal denoising] signal denoising based on Kalman filter with matlab code](/img/9e/9e569c83dc3106570cf7571056867f.png)
[signal denoising] signal denoising based on Kalman filter with matlab code

Can Siemens PLC collect analog data of multiple slave stations in real time and wirelessly?
![[image defogging] image defogging based on dark channel and non-mean filtering with matlab code](/img/44/6120682f9571f6ad35f8b9249b7fea.png)
[image defogging] image defogging based on dark channel and non-mean filtering with matlab code
![[image detection] realize the detection of nostrils and pupil circles based on combined separation filter matlab source code](/img/6a/92ace81b798810299a2fec0ce6ae70.png)
[image detection] realize the detection of nostrils and pupil circles based on combined separation filter matlab source code

消息队列常见的几种使用场景介绍

技术认证 | 图扑软件携手华为云再创合作共赢新局面

My annual salary is 1million, and I don't have clothes more than 100 yuan all over my body: saving money is the top self-discipline

NDK 系列(6):说一下注册 JNI 函数的方式和时机

C#委托用法--控制台项目,通过委托实现事件

【GNN报告】加拿大蒙特利尔唐建:Geometric Deep Learning For Drug Discovery
随机推荐
钉钉报警工具
寻找和利用 XXE – XML 外部实体注入
After returning to mixlab for three days, "creative team" cured my spiritual internal friction
Find and leverage xxE – XML external entity injection
What is the difference between concurrency and parallelism?
Sudden, wechat important notice
Security-001
【图像检测】基于Combined Separability Filter实现鼻孔和瞳孔等圆检测matlab源码
Using the optical fingerprint scheme under the huiding screen, Samsung Galaxy a71 5g is listed
回Mixlab三天,“创造力团队”治好了我的精神内耗
Simple and practical data visualization cases
360 was selected into the panorama of China's security industry, and isc2022 talked about the direction of security services in 63 fields
【CVA估值训练营】如何快速读懂上市公司年报——第四讲
进制转换方法
Winform怎么使用FTP实现自动更新
Software test function test full set of common interview questions [function test] interview summary 4-2
Test article
携手长江存储,江波龙推出全球最小扩展卡
2022夏暑假每日一题(五)
My annual salary is 1million, and I don't have clothes more than 100 yuan all over my body: saving money is the top self-discipline