From cdc9b726530c42298a5348f12563d73dd6989667 Mon Sep 17 00:00:00 2001 From: sige Date: Thu, 29 Feb 2024 15:51:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=90=AF=E5=8A=A8=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=97=B6=E6=B8=85=E7=A9=BA=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/my/graphiteDigesterBg/MyApplicationRunner.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/src/main/java/com/my/graphiteDigesterBg/MyApplicationRunner.java b/src/src/main/java/com/my/graphiteDigesterBg/MyApplicationRunner.java index d9b2148..50ad886 100644 --- a/src/src/main/java/com/my/graphiteDigesterBg/MyApplicationRunner.java +++ b/src/src/main/java/com/my/graphiteDigesterBg/MyApplicationRunner.java @@ -1,4 +1,6 @@ package com.my.graphiteDigesterBg; +import com.my.graphiteDigesterBg.diframe.DiDevice; +import jakarta.annotation.Resource; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; @@ -10,8 +12,17 @@ public class MyApplicationRunner implements ApplicationRunner { @Value("${opencv.library-path}") private String opencvLibraryPath; + @Resource + private DiDevice device; + @Override public void run(ApplicationArguments args) throws Exception { System.load(this.opencvLibraryPath); + + var runtimeVars = this.device.getRuntimeVariables(); + runtimeVars.remove("IsDeviceReady"); + runtimeVars.remove("IsTaskStartResetExecuting"); + runtimeVars.remove("TaskStartResetMessage"); + runtimeVars.remove("StatusMessage"); } }