You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
Java
41 lines
1.3 KiB
Java
4 years ago
|
//package com.docus.bgts.config;
|
||
|
//
|
||
|
//
|
||
|
//import com.docus.bgts.utils.FileUtils;
|
||
|
//import com.docus.bgts.utils.HttpUtils;
|
||
|
//import org.apache.logging.log4j.LogManager;
|
||
|
//import org.apache.logging.log4j.Logger;
|
||
|
//import org.springframework.beans.factory.annotation.Value;
|
||
|
//import org.springframework.scheduling.annotation.Scheduled;
|
||
|
//import org.springframework.stereotype.Component;
|
||
|
//
|
||
|
//import java.net.URISyntaxException;
|
||
|
//import java.util.HashMap;
|
||
|
//import java.util.Map;
|
||
|
//
|
||
|
//@Component
|
||
|
//public class MyScheduling {
|
||
|
//
|
||
|
// @Value("${beat.url}")
|
||
|
// private String beatUrl;
|
||
|
//
|
||
|
// private Logger logger = LogManager.getLogger(MyScheduling.class);
|
||
|
//
|
||
|
// //10分钟执行一次
|
||
|
// @Scheduled(fixedRate = 1000 * 60 * 5)
|
||
|
// public void beat() {
|
||
|
// logger.info("------------心跳开始---------------");
|
||
|
// Map<String, String> params = new HashMap<>();
|
||
|
// params.put("code", String.valueOf(FileUtils.getJsonByName("collectorid")));
|
||
|
// try {
|
||
|
// HttpUtils.get(beatUrl, params);
|
||
|
// } catch (URISyntaxException e) {
|
||
|
// e.printStackTrace();
|
||
|
// logger.info("心跳推送出错,可能是住院服务没有开启");
|
||
|
// } finally {
|
||
|
// logger.info("-------------心跳结束---------------");
|
||
|
// }
|
||
|
// }
|
||
|
//
|
||
|
//}
|