吉安感知网项目-后端
xiebin
2026-01-06 d207a86cdf1ab52ef8cb7cd83bad8fceab8038cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package org.sxkj.odm;
 
import org.mybatis.spring.annotation.MapperScan;
import org.springblade.core.cloud.client.BladeCloudApplication;
import org.springblade.core.launch.BladeApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.client.RestTemplate;
 
import java.util.concurrent.Executor;
 
/**
 * @author zhongrj
 */
@BladeCloudApplication
@EnableFeignClients(value = {"org.sxkj","org.springblade","com.dji.sample"})
@MapperScan({"org.springblade.**.mapper.**","org.sxkj.**.mapper.**"})
@EnableAsync
public class OdmApplication {
 
    @Bean
    public RestTemplate restTemplate(RestTemplateBuilder builder){
        return builder.build();
    }
 
    @Bean("odmTaskExecutor")
    public Executor odmTaskExecutor() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(5);
        executor.setThreadNamePrefix("ODM-Async-");
        return executor;
    }
 
    public static void main(String[] args) {
        BladeApplication.run("drone-odm", OdmApplication.class, args);
    }
 
}