| | |
| | | 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 = "1198356069286412288"; |
| | | private final static String appId = "1199051650585591808"; |
| | | |
| | | private final static String appSecret = "RwnFMTYxMjIwMjUxNzIwMTY5Mjk0ij"; |
| | | private final static String appSecret = "wWAOMTgxMjIwMjUxNTI0MTY0MzQrD6"; |
| | | |
| | | // 内网地址 |
| | | private final static String ip = "http://58.56.84.138:8083"; |
| | | private final static String ip = "http://10.136.0.8:8083"; |
| | | |
| | | // MD5加密并转换为16进制 |
| | | public static String md5Encryption(String input) { |
| | |
| | | /** |
| | | * 五分钟一次的心跳 |
| | | */ |
| | | // @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 |