diff --git a/common/src/main/java/org/dromara/dynamictp/common/util/ReflectionUtil.java b/common/src/main/java/org/dromara/dynamictp/common/util/ReflectionUtil.java index d0bb4d184..562562bff 100644 --- a/common/src/main/java/org/dromara/dynamictp/common/util/ReflectionUtil.java +++ b/common/src/main/java/org/dromara/dynamictp/common/util/ReflectionUtil.java @@ -99,7 +99,7 @@ public static Field getField(Class targetClass, String fieldName) { } public static Method findMethod(Class targetClass, String methodName, Class... parameterTypes) { - Method method = MethodUtils.getMatchingAccessibleMethod(targetClass, methodName, parameterTypes); + Method method = MethodUtils.getMatchingMethod(targetClass, methodName, parameterTypes); if (Objects.isNull(method)) { log.warn("Method '{}' with parameters '{}' not found in class '{}'", methodName, parameterTypes, targetClass.getName()); } diff --git a/core/src/main/java/org/dromara/dynamictp/core/executor/ScheduledDtpExecutor.java b/core/src/main/java/org/dromara/dynamictp/core/executor/ScheduledDtpExecutor.java index 23421196c..835053114 100644 --- a/core/src/main/java/org/dromara/dynamictp/core/executor/ScheduledDtpExecutor.java +++ b/core/src/main/java/org/dromara/dynamictp/core/executor/ScheduledDtpExecutor.java @@ -59,6 +59,7 @@ public ScheduledDtpExecutor(int corePoolSize, corePoolSize = corePoolSize == 0 ? 1 : corePoolSize; } delegate = new ScheduledThreadPoolExecutorProxy(new ScheduledThreadPoolExecutor(corePoolSize, threadFactory, handler)); + delegate.setTaskWrappers(getTaskWrappers()); } @Override