高级算法和暂态文件同步合并jar包
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.njcn.influx.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2026/04/20 下午 1:27【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@Data
|
||||
public class OtherConfig {
|
||||
|
||||
@Value("${business.wavePath}")
|
||||
private String wavePath;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.njcn.influx.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.Order;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2026/04/20 下午 2:47【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@Order(10)
|
||||
public class TargetConfig {
|
||||
@Value("${server.target.host}")
|
||||
private String host;
|
||||
@Value("${server.target.port}")
|
||||
|
||||
private int port;
|
||||
@Value("${server.target.username}")
|
||||
|
||||
private String username;
|
||||
@Value("${server.target.password}")
|
||||
|
||||
private String password;
|
||||
@Value("${server.target.privateKeyPath}")
|
||||
|
||||
private String privateKeyPath;
|
||||
@Value("${server.target.basePath}")
|
||||
private String basePath;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.influx.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2026/04/20 下午 1:21【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@EnableAsync
|
||||
public class ThreadPoolConfig {
|
||||
|
||||
@Value("${task.pool.core-size:10}")
|
||||
private int coreSize;
|
||||
@Value("${task.pool.max-size:30}")
|
||||
private int maxSize;
|
||||
@Value("${task.pool.queue-capacity:1000}")
|
||||
private int queueCapacity;
|
||||
|
||||
@Bean("eventTaskExecutor")
|
||||
public Executor eventTaskExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(coreSize);
|
||||
executor.setMaxPoolSize(maxSize);
|
||||
executor.setQueueCapacity(queueCapacity);
|
||||
executor.setThreadNamePrefix("event-task-");
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user