1. ThreadPool添加@Component注解

topo_dev
xueqingkun 8 months ago
parent 5549435aee
commit d09adfd883

@ -4,6 +4,7 @@ import cn.hutool.core.thread.ThreadUtil;
import jakarta.annotation.PostConstruct; import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
@ -11,6 +12,7 @@ import java.util.concurrent.ExecutorService;
* 线 * 线
*/ */
@Slf4j @Slf4j
@Component
public class RecordSplitTypeThreadPool { public class RecordSplitTypeThreadPool {
@Value("${fu-hsi-config.thread-pool.type.core:2}") @Value("${fu-hsi-config.thread-pool.type.core:2}")
private int core; private int core;

@ -4,10 +4,12 @@ import cn.hutool.core.thread.ThreadUtil;
import jakarta.annotation.PostConstruct; import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
@Slf4j @Slf4j
@Component
public class TripleExtractThreadPool { public class TripleExtractThreadPool {
@Value("${fu-hsi-config.thread-pool.triple.core:2}") @Value("${fu-hsi-config.thread-pool.triple.core:2}")
private int core; private int core;

Loading…
Cancel
Save