1
13693261870
2024-12-06 faf8bfe6aff8e7a06adbdb63e14c3b83ef52614f
1
已添加1个文件
已修改1个文件
40 ■■■■■ 文件已修改
se-modules/se-system/src/main/java/com/se/system/utils/ConnectUtils.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
说明.txt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-modules/se-system/src/main/java/com/se/system/utils/ConnectUtils.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
package com.se.system.utils;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.URL;
@SuppressWarnings("ALL")
public class ConnectUtils {
    public static boolean pingIp(String ip) {
        try {
            InetAddress inetAddress = InetAddress.getByName(ip);
            return inetAddress.isReachable(1000);
        } catch (Exception ex) {
            return false;
        }
    }
    public static boolean getUrl(String uri, String method) {
        try {
            URL url = new URL(uri);
            HttpURLConnection con = (HttpURLConnection) url.openConnection();
            con.setRequestMethod(method);
            con.setConnectTimeout(1000);
            con.setReadTimeout(1000);
            int code = con.getResponseCode();
            return code >= 200 && code <= 399;
        } catch (Exception ex) {
            return false;
        }
    }
}
˵Ã÷.txt
@@ -1,3 +1,7 @@
--------------------------------------------------------
1.docker软件启停 â†’ se-mysql,se-system,se-redis,se-wgcloud
2.分系统定时任务  â†’ http://loclahost:8080/system/health    â†’ ConnectUtils
3.软件授权       â†’ wgcloud,se-system
--------------------------------------------------------
http://192.168.11.203:8090/sso/login,admin,admin123
@@ -74,3 +78,4 @@
  tablePrefix: sys_
--------------------------------------------------------
repository ç›®å½•下 _remote.respositories,删除。