| | |
| | | @Component |
| | | @Slf4j |
| | | public class TideUtils { |
| | | private final static String appId = "1151162645026439168"; |
| | | private final static String appId = "1199046934233350144"; |
| | | |
| | | private final static String appSecret = "t1BsMDgwODIwMjUxMTUwMjc3NzMdNi"; |
| | | private final static String appSecret = "Em25MTgxMjIwMjUxNTA1MzE5Njc35w"; |
| | | |
| | | // 内网地址 |
| | | 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 + "应用心跳执行成功!"); |
| | | log.info("应用心跳执行成功->{}",body); |
| | | } |
| | | |
| | | // 获取token |