记得上下班打卡 | git大法好,push需谨慎

Commit 2dcca21b authored by wangyifan's avatar wangyifan

添加异常捕获

parent b5e0aa3b
......@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.service.impl;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.kylin.service.IFeishuBotService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......@@ -10,6 +11,7 @@ import java.util.HashMap;
import java.util.Map;
@Service
@Slf4j
public class FeishuBotServiceImpl implements IFeishuBotService {
@Value("${liquidnet.feishu.bWebhook}")
......@@ -23,7 +25,10 @@ public class FeishuBotServiceImpl implements IFeishuBotService {
Map<String, Object> bodyMap = new HashMap<>();
bodyMap.put("msg_type", "text");
bodyMap.put("content", textMap);
HttpUtil.postJson(bWebhook, JsonUtils.toJson(bodyMap));
try {
HttpUtil.postJson(bWebhook, JsonUtils.toJson(bodyMap));
}catch (Exception e){
log.error("error.", e);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment