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(); + } + } }