-
Notifications
You must be signed in to change notification settings - Fork 863
Open
Labels
bugSomething isn't workingSomething isn't working
Description
平台
Windows
Jdk版本
JDK 21
SpringBoot版本
2.7.18
DynamicTp版本
1.2.2
配置中心类型
无配置中心
配置中心版本
无
问题描述
问题描述:断点调试ScheduledDtpExecutor的schedule方法,查看当前对象的taskWrappers属性是有自定义的TaskWrapper实例,但delegate的taskWrappers是空集合
application.yaml配置文件:
dynamicpt:
...
executors:
- threadPoolName: scheduledThreadPool
threadPoolAliasName: "spring定时任务线程池"
executorType: scheduled
taskWrapperNames: ["reqId"]
...
spring Scheduling配置类:
@Configuration
public class MyScheduledConfig implements SchedulingConfigurer {
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
ThreadPoolExecutor scheduledThreadPool = DtpRegistry.getDtpExecutor("scheduledThreadPool");
taskRegistrar.setScheduler(scheduledThreadPool);
}
}
复现步骤
- jdk21 + springboot 2.7.18 + dynamictp 1.2.2
其他信息
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working