提交 | 用户 | 时间
|
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 com.iail.IAILMDK; |
潘 |
7 |
import org.springframework.scheduling.annotation.EnableAsync; |
a6de49
|
8 |
|
7fd198
|
9 |
import java.io.InputStream; |
潘 |
10 |
import java.util.Properties; |
|
11 |
|
|
12 |
@EnableAsync |
a6de49
|
13 |
@SpringBootApplication |
H |
14 |
public class ModelServiceApplication implements CommandLineRunner { |
|
15 |
|
bbc1ee
|
16 |
/*static { |
7fd198
|
17 |
//加载动态链接库 |
潘 |
18 |
try { |
|
19 |
Properties properties = new Properties(); |
|
20 |
InputStream in = ModelServiceApplication.class.getClassLoader().getResourceAsStream("iailmdk.properties"); |
|
21 |
properties.load(in); |
|
22 |
String mdkInitPath = properties.getProperty("mdk-init-path"); |
|
23 |
System.out.println("mdkInitPath=" + mdkInitPath); |
|
24 |
IAILMDK.initWithBean(mdkInitPath, false); |
|
25 |
} catch (Exception e) { |
|
26 |
e.printStackTrace(); |
|
27 |
System.out.println("动态链接库IAILMDK初始化失败"); |
|
28 |
} |
|
29 |
} |
bbc1ee
|
30 |
*/ |
a6de49
|
31 |
|
H |
32 |
public static void main(String[] args) { |
|
33 |
SpringApplication.run(ModelServiceApplication.class, args); |
|
34 |
} |
|
35 |
|
|
36 |
/** |
|
37 |
* 容器初始化后加载路由 |
|
38 |
* |
|
39 |
* @param strings |
|
40 |
*/ |
|
41 |
@Override |
|
42 |
public void run(String... strings) { |
|
43 |
} |
|
44 |
} |