|
|
@ -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"); |
|
|
|
} |
|
|
|
} |