From faf8bfe6aff8e7a06adbdb63e14c3b83ef52614f Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 06 十二月 2024 14:51:19 +0800
Subject: [PATCH] 1

---
 se-modules/se-system/src/main/java/com/se/system/utils/ConnectUtils.java |   35 +++++++++++++++++++++++++++++++++++
 说明.txt                                                                   |    5 +++++
 2 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/se-modules/se-system/src/main/java/com/se/system/utils/ConnectUtils.java b/se-modules/se-system/src/main/java/com/se/system/utils/ConnectUtils.java
new file mode 100644
index 0000000..9d1741d
--- /dev/null
+++ b/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;
+        }
+    }
+}
diff --git "a/\350\257\264\346\230\216.txt" "b/\350\257\264\346\230\216.txt"
index eee8c41..922a5b0 100644
--- "a/\350\257\264\346\230\216.txt"
+++ "b/\350\257\264\346\230\216.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锛宎dmin锛宎dmin123
@@ -74,3 +78,4 @@
   tablePrefix: sys_
 
 --------------------------------------------------------
+repository 鐩綍涓� _remote.respositories锛屽垹闄ゃ��
\ No newline at end of file

--
Gitblit v1.9.3