提交 7fa724ba authored 作者: xuxueli's avatar xuxueli

update document

上级 d7ee76f0
...@@ -2256,11 +2256,12 @@ public void execute() { ...@@ -2256,11 +2256,12 @@ public void execute() {
- 5、【优化】任务线程名优化,提升可读性与问题定位效率(ISSUE-2527)。 - 5、【优化】任务线程名优化,提升可读性与问题定位效率(ISSUE-2527)。
### 7.33 版本 v2.4.0 Release Notes[规划中] ### 7.33 版本 v2.4.0 Release Notes[规划中]
- 1、【优化】[规划中]任务日志重构:一次调度只记录一条主任务,维护起止时间和状态。 - 1、【优化】执行器任务Bean扫描逻辑优化:解决懒加载注解失效问题。
- 2、【优化】[规划中]任务日志重构:一次调度只记录一条主任务,维护起止时间和状态。
- 普通任务:只记录一条主任务; - 普通任务:只记录一条主任务;
- 广播任务:记录一条主任务,每个分片任务记录一条次任务,关联在主任务上; - 广播任务:记录一条主任务,每个分片任务记录一条次任务,关联在主任务上;
- 重试任务:失败时,新增主任务。所有调度记录,包括入口调度和重试调度,均挂载主任务上。 - 重试任务:失败时,新增主任务。所有调度记录,包括入口调度和重试调度,均挂载主任务上。
- 2、【优化】[规划中]分片任务:全部完成后才会出发后置节点; - 3、【优化】[规划中]分片任务:全部完成后才会出发后置节点;
### 7.34 版本 v2.4.1 Release Notes[规划中] ### 7.34 版本 v2.4.1 Release Notes[规划中]
- 1、[规划中]DAG流程任务 - 1、[规划中]DAG流程任务
......
...@@ -3,7 +3,6 @@ package com.xxl.job.core.executor.impl; ...@@ -3,7 +3,6 @@ package com.xxl.job.core.executor.impl;
import com.xxl.job.core.executor.XxlJobExecutor; import com.xxl.job.core.executor.XxlJobExecutor;
import com.xxl.job.core.glue.GlueFactory; import com.xxl.job.core.glue.GlueFactory;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.handler.impl.MethodJobHandler;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
...@@ -85,15 +84,18 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC ...@@ -85,15 +84,18 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
// init job handler from method // init job handler from method
String[] beanDefinitionNames = applicationContext.getBeanNamesForType(Object.class, false, true); String[] beanDefinitionNames = applicationContext.getBeanNamesForType(Object.class, false, true);
for (String beanDefinitionName : beanDefinitionNames) { for (String beanDefinitionName : beanDefinitionNames) {
// get bean
Object bean = null; Object bean = null;
Lazy onBean = applicationContext.findAnnotationOnBean(beanDefinitionName, Lazy.class); Lazy onBean = applicationContext.findAnnotationOnBean(beanDefinitionName, Lazy.class);
if (onBean!=null){ if (onBean!=null){
logger.debug("xxl-job skip @Lazy Bean:{}",beanDefinitionName); logger.debug("xxl-job annotation scan, skip @Lazy Bean:{}", beanDefinitionName);
continue; continue;
}else { }else {
bean = applicationContext.getBean(beanDefinitionName); bean = applicationContext.getBean(beanDefinitionName);
} }
// filter method
Map<Method, XxlJob> annotatedMethods = null; // referred to :org.springframework.context.event.EventListenerMethodProcessor.processBean Map<Method, XxlJob> annotatedMethods = null; // referred to :org.springframework.context.event.EventListenerMethodProcessor.processBean
try { try {
annotatedMethods = MethodIntrospector.selectMethods(bean.getClass(), annotatedMethods = MethodIntrospector.selectMethods(bean.getClass(),
...@@ -110,12 +112,14 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC ...@@ -110,12 +112,14 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
continue; continue;
} }
// generate and regist method job handler
for (Map.Entry<Method, XxlJob> methodXxlJobEntry : annotatedMethods.entrySet()) { for (Map.Entry<Method, XxlJob> methodXxlJobEntry : annotatedMethods.entrySet()) {
Method executeMethod = methodXxlJobEntry.getKey(); Method executeMethod = methodXxlJobEntry.getKey();
XxlJob xxlJob = methodXxlJobEntry.getValue(); XxlJob xxlJob = methodXxlJobEntry.getValue();
// regist // regist
registJobHandler(xxlJob, bean, executeMethod); registJobHandler(xxlJob, bean, executeMethod);
} }
} }
} }
...@@ -131,4 +135,13 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC ...@@ -131,4 +135,13 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
return applicationContext; return applicationContext;
} }
/*
BeanDefinitionRegistryPostProcessor
registry.getBeanDefine()
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
this.registry = registry;
}
* */
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论