Jay
2024-09-30 9f049d2c92a1fa6ceb8d7d6680a55c87eb7a0d6a
提交 | 用户 | 时间
a6de49 1 package com.iailab;
H 2
3 import org.springframework.boot.CommandLineRunner;
4 import org.springframework.boot.SpringApplication;
5 import org.springframework.boot.autoconfigure.SpringBootApplication;
7fd198 6 import org.springframework.scheduling.annotation.EnableAsync;
a6de49 7
7fd198 8 import java.util.Properties;
9
10 @EnableAsync
a6de49 11 @SpringBootApplication
H 12 public class ModelServiceApplication implements CommandLineRunner {
13
137356 14     static {
7fd198 15         //加载动态链接库
16         try {
17             Properties properties = new Properties();
9f049d 18 //            InputStream in = ModelServiceApplication.class.getClassLoader().getResourceAsStream("iailmdk.properties");
J 19 //            properties.load(in);
20 //            String mdkInitPath = properties.getProperty("mdk-init-path");
21 //            System.out.println("mdkInitPath=" + mdkInitPath);
22 //            System.load(mdkInitPath + File.separator + "IAIL.MDK.Mid.Windows.dll");
23 //            Environment env = new Environment();
24 //            env.init();
7fd198 25         } catch (Exception e) {
26             e.printStackTrace();
1fea3e 27             System.out.println("动态链接库IAIL.MDK.Mid.Windows.dll初始化失败");
7fd198 28         }
449017 29
7fd198 30     }
137356 31
a6de49 32
H 33     public static void main(String[] args) {
34         SpringApplication.run(ModelServiceApplication.class, args);
35     }
36
37     /**
38      * 容器初始化后加载路由
39      *
40      * @param strings
41      */
42     @Override
43     public void run(String... strings) {
44     }
45 }