Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
8f618661
提交
8f618661
authored
3月 26, 2020
作者:
xuxueli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
移除旧类注解JobHandler,推荐使用基于方法注解 "@XxlJob" 的方式进行任务开发;(如需保留类注解JobHandler使用方式,可以参考旧版逻辑定制开发);
上级
6d9e00c6
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
32 行增加
和
35 行删除
+32
-35
XXL-JOB官方文档.md
doc/XXL-JOB官方文档.md
+5
-5
XxlJobSpringExecutor.java
.../com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
+3
-6
JobHandler.java
.../java/com/xxl/job/core/handler/annotation/JobHandler.java
+24
-24
没有找到文件。
doc/XXL-JOB官方文档.md
浏览文件 @
8f618661
...
...
@@ -1713,11 +1713,11 @@ public ReturnT<String> execute(String param) {
-
7、执行器XxlJob注解扫描逻辑优化,修复任务为空时小概率NPE问题;
-
8、Web IDE交互问题修复:输入源码备注之后按回车跳转error问题处理;
-
9、调度中心国际化完善:新增 "中文繁体" 支持。默认为 "zh_CN"/中文简体, 可选范围为 "zh_CN"/中文简体, "zh_TC"/中文繁体 and "en"/英文;
-
10、
[
迭代中
]
自定义失败重试时间间隔;
-
11、
[
迭代中
]
任务复制功能;点击复制是弹出新建任务弹框,并初始化被复制任务信息
;
-
12、
[
迭代中
]
新增执行器描述、任务描述属性
;
-
13、
[
迭代中
]
任务执行一次的时候指定IP
;
-
14、
[
迭代中
]
移除旧类注解JobHandler,推荐使用基于方法注解 "@XxlJob" 的方式进行任务开发
;
-
10、
移除旧类注解JobHandler,推荐使用基于方法注解 "@XxlJob" 的方式进行任务开发;(如需保留类注解JobHandler使用方式,可以参考旧版逻辑定制开发);
-
11、
[
迭代中
]
自定义失败重试时间间隔
;
-
12、
[
迭代中
]
任务复制功能;点击复制是弹出新建任务弹框,并初始化被复制任务信息
;
-
13、
[
迭代中
]
新增执行器描述、任务描述属性
;
-
14、
[
迭代中
]
任务执行一次的时候指定IP
;
-
15、
[
迭代中
]
任务日志支持单个清理和状态转移,方便触发子任务;
-
16、
[
迭代中
]
任务结果丢失处理:针对长期处于运行中的任务(设置过期时间时,运行超过"过期时间+1min";未设置超时时间时,运行超过"30min"),主动检测该执行器是否在线,如果不在线主动标记失败;
-
17、
[
迭代中
]
优雅停机回调丢失问题修复;
...
...
xxl-job-core/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
浏览文件 @
8f618661
...
...
@@ -3,8 +3,6 @@ package com.xxl.job.core.executor.impl;
import
com.xxl.job.core.biz.model.ReturnT
;
import
com.xxl.job.core.executor.XxlJobExecutor
;
import
com.xxl.job.core.glue.GlueFactory
;
import
com.xxl.job.core.handler.IJobHandler
;
import
com.xxl.job.core.handler.annotation.JobHandler
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
com.xxl.job.core.handler.impl.MethodJobHandler
;
import
org.springframework.beans.BeansException
;
...
...
@@ -15,7 +13,6 @@ import org.springframework.context.ApplicationContextAware;
import
org.springframework.core.annotation.AnnotationUtils
;
import
java.lang.reflect.Method
;
import
java.util.Map
;
/**
* xxl-job executor (for spring)
...
...
@@ -30,7 +27,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
public
void
afterPropertiesSet
()
throws
Exception
{
// init JobHandler Repository
initJobHandlerRepository
(
applicationContext
);
/*initJobHandlerRepository(applicationContext);*/
// init JobHandler Repository (for method)
initJobHandlerMethodRepository
(
applicationContext
);
...
...
@@ -49,7 +46,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
}
private
void
initJobHandlerRepository
(
ApplicationContext
applicationContext
)
{
/*
private void initJobHandlerRepository(ApplicationContext applicationContext) {
if (applicationContext == null) {
return;
}
...
...
@@ -69,7 +66,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
}
}
}
}
}
*/
private
void
initJobHandlerMethodRepository
(
ApplicationContext
applicationContext
)
{
if
(
applicationContext
==
null
)
{
...
...
xxl-job-core/src/main/java/com/xxl/job/core/handler/annotation/JobHandler.java
浏览文件 @
8f618661
package
com
.
xxl
.
job
.
core
.
handler
.
annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Inherited
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* annotation for job handler
*
* will be replaced by {@link com.xxl.job.core.handler.annotation.XxlJob}
*
* @author 2016-5-17 21:06:49
*/
@Target
({
ElementType
.
TYPE
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Inherited
@Deprecated
public
@interface
JobHandler
{
String
value
();
}
//
package com.xxl.job.core.handler.annotation;
//
//
import java.lang.annotation.ElementType;
//
import java.lang.annotation.Inherited;
//
import java.lang.annotation.Retention;
//
import java.lang.annotation.RetentionPolicy;
//
import java.lang.annotation.Target;
//
/
//
**
//
* annotation for job handler
//
*
//
* will be replaced by {@link com.xxl.job.core.handler.annotation.XxlJob}
//
*
//
* @author 2016-5-17 21:06:49
//
*/
//
@Target({ElementType.TYPE})
//
@Retention(RetentionPolicy.RUNTIME)
//
@Inherited
//
@Deprecated
//
public @interface JobHandler {
//
//
String value();
//
//
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论