refactor(tik): 移除 ICE 异步提交专用线程池定义
Some checks failed
Build and Deploy / deploy (push) Has been cancelled

将线程池定义移至 `TikAsyncConfig` 配置类中统一管理,清理 `MixTaskConfig` 中冗余的 `iceSubmitExecutor` Bean 定义,提升配置职责的清晰度。
This commit is contained in:
2026-06-03 22:58:57 +08:00
parent 077a15451b
commit 499698cb0d

View File

@@ -2,14 +2,10 @@ package cn.iocoder.yudao.module.tik.mix.config;
import lombok.extern.slf4j.Slf4j;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import java.security.Security;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* 混剪任务配置
@@ -21,27 +17,14 @@ import java.util.concurrent.TimeUnit;
@EnableScheduling
public class MixTaskConfig {
/**
* ICE 异步提交专用线程池
* <p>
* 核心线程 4最大线程 10空闲 60s 回收,有界队列 200
* 拒绝策略调用者线程执行CallerRunsPolicy确保任务不丢失
*/
@Bean("iceSubmitExecutor")
public ThreadPoolExecutor iceSubmitExecutor() {
return new ThreadPoolExecutor(
4, 10,
60, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(200),
new ThreadPoolExecutor.CallerRunsPolicy()
);
}
/**
* 注册 BouncyCastle 安全提供者
* <p>
* ICE SDK 底层依赖 BC 做 API 请求签名({@code org.bouncycastle.crypto.Digest})。
* Java 17 已内置 JCE不再存在嵌套 JAR 签名校验失败的问题,直接注册即可
* Java 17 已内置 JCE不再存在嵌套 JAR 签名校验失败的问题。
* <p>
* 注意ICE 提交专用线程池 {@code iceSubmitExecutor} 定义在
* {@link cn.iocoder.yudao.module.tik.config.TikAsyncConfig} 中。
*/
static {
try {