| | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.security.MessageDigest; |
| | |
| | | @Component |
| | | @Slf4j |
| | | public class TideUtils { |
| | | private final static String appId = "1198306299205386240"; |
| | | private final static String appId = "1203028744864792576"; |
| | | |
| | | private final static String appSecret = "1JV4MTYxMjIwMjUxNDAyMzA4MTYloN"; |
| | | private final static String appSecret = "6zIfMjkxMjIwMjUxNDQ3NDk2MDEPZD"; |
| | | |
| | | // 内网地址 |
| | | private final static String ip = "http://10.136.0.8:8083"; |
| | |
| | | /** |
| | | * 五分钟一次的心跳 |
| | | */ |
| | | // @Scheduled(cron = "0 0/5 * * * ?") |
| | | @Scheduled(cron = "0 0/5 * * * ?") |
| | | public static void heartbeat(){ |
| | | HashMap<String, String> header = getGetHeader(null); |
| | | String url = ip + "/cpn/api/extra/v1/application/heartbeat"; |
| | | String body = HttpRequest.get(url).headerMap(header, false).execute().body(); |
| | | System.out.println(body + "=======MES心跳执行成功!"); |
| | | log.info("应用心跳执行成功->{}",body); |
| | | } |
| | | |
| | | // 获取token |