Ver código fonte

改造没有配置face-engine时 不启动

wukai 1 ano atrás
pai
commit
af4ffef38d

+ 3 - 2
doc-biz/src/main/java/com/doc/face/init/FaceEngineInit.java

@@ -76,8 +76,9 @@ public class FaceEngineInit implements ApplicationListener<ContextRefreshedEvent
     @Override
     public void onApplicationEvent(ContextRefreshedEvent event) {
         if (event.getApplicationContext().getParent() == null) {
-            log.info("SpringBoot项目加载后执行人脸识别初始化!");
-            if ("true".equals(environment.getProperty("chat-glm3.flag"))) {
+            boolean flag = "true".equals(environment.getProperty("face-engine.flag"));
+            log.info("SpringBoot项目加载后执行人脸识别初始化!,人脸识别开启:{}", flag);
+            if (flag) {
                 initEngine();
                 register();
             }