From 587b438f50abb725f3dee63eaf6b586c09085f54 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期四, 26 九月 2024 09:59:14 +0800 Subject: [PATCH] bug + 模型方法参数排序 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/ModelServiceApplication.java | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/ModelServiceApplication.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/ModelServiceApplication.java index 133ad84..df28449 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/ModelServiceApplication.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/ModelServiceApplication.java @@ -4,9 +4,12 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import com.iail.IAILMDK; +import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.scheduling.annotation.EnableAsync; +import java.io.File; import java.io.InputStream; +import java.util.Objects; import java.util.Properties; @EnableAsync @@ -26,6 +29,25 @@ e.printStackTrace(); System.out.println("动态链接库IAILMDK初始化失败"); } + + try { + System.out.println("动态加载dll"); + String dllDir = Objects.requireNonNull(ModelServiceApplication.class.getClassLoader().getResource("dll")).getPath(); + File dir = new File(dllDir); + if (dir.exists()) { + File[] files = dir.listFiles(); + if (files.length > 0) { + for (File file : files) { + System.out.println("加载:" + file.getAbsolutePath()); + System.load(file.getAbsolutePath()); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + System.out.println("动态加载dll失败"); + } + } */ -- Gitblit v1.9.3