From cb0819f3e3c2b799e713ad18ad98c8717e7f8180 Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Tue, 27 Feb 2024 10:30:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E9=A1=B5=E6=80=BB?= =?UTF-8?q?=E6=9D=A1=E6=95=B0=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zcloud/config/StartWebsocketServer.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/zcloud/config/StartWebsocketServer.java b/src/main/java/com/zcloud/config/StartWebsocketServer.java index 92112cc..c2e2b2c 100644 --- a/src/main/java/com/zcloud/config/StartWebsocketServer.java +++ b/src/main/java/com/zcloud/config/StartWebsocketServer.java @@ -1,5 +1,6 @@ package com.zcloud.config; +import com.zcloud.plugins.websocketFace.FaceServer; import org.java_websocket.WebSocketImpl; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; @@ -17,7 +18,22 @@ public class StartWebsocketServer implements ApplicationRunner{ @Override public void run(ApplicationArguments var1) throws Exception{ + startWebsocketInstantFace(); //启动定时人脸识别服务 System.out.println("-------------------系统启动成功-------------------"); } + /** + * 启动定时人脸识别服务 + */ + public void startWebsocketInstantFace(){ + WebSocketImpl.DEBUG = false; + FaceServer s; + try { + String imPort = "8899"; //即时通讯端口 + s = new FaceServer(Integer.parseInt(imPort)); + s.start(); + } catch (Exception e) { + e.printStackTrace(); + } + } }