Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8f618661
authored
Mar 26, 2020
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
移除旧类注解JobHandler,推荐使用基于方法注解 "@XxlJob" 的方式进行任务开发;(如需保留类注解JobHandler使用方式,可以参考旧版逻辑定制开发);
parent
6d9e00c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
36 deletions
doc/XXL-JOB官方文档.md
xxl-job-core/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
xxl-job-core/src/main/java/com/xxl/job/core/handler/annotation/JobHandler.java
doc/XXL-JOB官方文档.md
View file @
8f618661
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
@@ -1713,11 +1713,11 @@ public ReturnT<String> execute(String param) {
...
@@ -1713,11 +1713,11 @@ public ReturnT<String> execute(String param) {
-
7、执行器XxlJob注解扫描逻辑优化,修复任务为空时小概率NPE问题;
-
7、执行器XxlJob注解扫描逻辑优化,修复任务为空时小概率NPE问题;
-
8、Web IDE交互问题修复:输入源码备注之后按回车跳转error问题处理;
-
8、Web IDE交互问题修复:输入源码备注之后按回车跳转error问题处理;
-
9、调度中心国际化完善:新增 "中文繁体" 支持。默认为 "zh_CN"/中文简体, 可选范围为 "zh_CN"/中文简体, "zh_TC"/中文繁体 and "en"/英文;
-
9、调度中心国际化完善:新增 "中文繁体" 支持。默认为 "zh_CN"/中文简体, 可选范围为 "zh_CN"/中文简体, "zh_TC"/中文繁体 and "en"/英文;
-
10、
[
迭代中
]
自定义失败重试时间间隔;
-
10、
移除旧类注解JobHandler,推荐使用基于方法注解 "@XxlJob" 的方式进行任务开发;(如需保留类注解JobHandler使用方式,可以参考旧版逻辑定制开发);
-
11、
[
迭代中
]
任务复制功能;点击复制是弹出新建任务弹框,并初始化被复制任务信息
;
-
11、
[
迭代中
]
自定义失败重试时间间隔
;
-
12、
[
迭代中
]
新增执行器描述、任务描述属性
;
-
12、
[
迭代中
]
任务复制功能;点击复制是弹出新建任务弹框,并初始化被复制任务信息
;
-
13、
[
迭代中
]
任务执行一次的时候指定IP
;
-
13、
[
迭代中
]
新增执行器描述、任务描述属性
;
-
14、
[
迭代中
]
移除旧类注解JobHandler,推荐使用基于方法注解 "@XxlJob" 的方式进行任务开发
;
-
14、
[
迭代中
]
任务执行一次的时候指定IP
;
-
15、
[
迭代中
]
任务日志支持单个清理和状态转移,方便触发子任务;
-
15、
[
迭代中
]
任务日志支持单个清理和状态转移,方便触发子任务;
-
16、
[
迭代中
]
任务结果丢失处理:针对长期处于运行中的任务(设置过期时间时,运行超过"过期时间+1min";未设置超时时间时,运行超过"30min"),主动检测该执行器是否在线,如果不在线主动标记失败;
-
16、
[
迭代中
]
任务结果丢失处理:针对长期处于运行中的任务(设置过期时间时,运行超过"过期时间+1min";未设置超时时间时,运行超过"30min"),主动检测该执行器是否在线,如果不在线主动标记失败;
-
17、
[
迭代中
]
优雅停机回调丢失问题修复;
-
17、
[
迭代中
]
优雅停机回调丢失问题修复;
...
...
xxl-job-core/src/main/java/com/xxl/job/core/executor/impl/XxlJobSpringExecutor.java
View file @
8f618661
...
@@ -3,8 +3,6 @@ package com.xxl.job.core.executor.impl;
...
@@ -3,8 +3,6 @@ package com.xxl.job.core.executor.impl;
import
com.xxl.job.core.biz.model.ReturnT
;
import
com.xxl.job.core.biz.model.ReturnT
;
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.IJobHandler
;
import
com.xxl.job.core.handler.annotation.JobHandler
;
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
com.xxl.job.core.handler.impl.MethodJobHandler
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.BeansException
;
...
@@ -15,7 +13,6 @@ import org.springframework.context.ApplicationContextAware;
...
@@ -15,7 +13,6 @@ import org.springframework.context.ApplicationContextAware;
import
org.springframework.core.annotation.AnnotationUtils
;
import
org.springframework.core.annotation.AnnotationUtils
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.util.Map
;
/**
/**
* xxl-job executor (for spring)
* xxl-job executor (for spring)
...
@@ -30,7 +27,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
...
@@ -30,7 +27,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
public
void
afterPropertiesSet
()
throws
Exception
{
public
void
afterPropertiesSet
()
throws
Exception
{
// init JobHandler Repository
// init JobHandler Repository
initJobHandlerRepository
(
applicationContext
);
/*initJobHandlerRepository(applicationContext);*/
// init JobHandler Repository (for method)
// init JobHandler Repository (for method)
initJobHandlerMethodRepository
(
applicationContext
);
initJobHandlerMethodRepository
(
applicationContext
);
...
@@ -49,7 +46,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
...
@@ -49,7 +46,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
}
}
private
void
initJobHandlerRepository
(
ApplicationContext
applicationContext
)
{
/*
private void initJobHandlerRepository(ApplicationContext applicationContext) {
if (applicationContext == null) {
if (applicationContext == null) {
return;
return;
}
}
...
@@ -69,7 +66,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
...
@@ -69,7 +66,7 @@ public class XxlJobSpringExecutor extends XxlJobExecutor implements ApplicationC
}
}
}
}
}
}
}
}
*/
private
void
initJobHandlerMethodRepository
(
ApplicationContext
applicationContext
)
{
private
void
initJobHandlerMethodRepository
(
ApplicationContext
applicationContext
)
{
if
(
applicationContext
==
null
)
{
if
(
applicationContext
==
null
)
{
...
...
xxl-job-core/src/main/java/com/xxl/job/core/handler/annotation/JobHandler.java
View file @
8f618661
package
com
.
xxl
.
job
.
core
.
handler
.
annotation
;
//
package com.xxl.job.core.handler.annotation;
//
import
java.lang.annotation.ElementType
;
//
import java.lang.annotation.ElementType;
import
java.lang.annotation.Inherited
;
//
import java.lang.annotation.Inherited;
import
java.lang.annotation.Retention
;
//
import java.lang.annotation.Retention;
import
java.lang.annotation.RetentionPolicy
;
//
import java.lang.annotation.RetentionPolicy;
import
java.lang.annotation.Target
;
//
import java.lang.annotation.Target;
//
/**
/
//
**
* annotation for job handler
//
* annotation for job handler
*
//
*
* will be replaced by {@link com.xxl.job.core.handler.annotation.XxlJob}
//
* will be replaced by {@link com.xxl.job.core.handler.annotation.XxlJob}
*
//
*
* @author 2016-5-17 21:06:49
//
* @author 2016-5-17 21:06:49
*/
//
*/
@Target
({
ElementType
.
TYPE
})
//
@Target({ElementType.TYPE})
@Retention
(
RetentionPolicy
.
RUNTIME
)
//
@Retention(RetentionPolicy.RUNTIME)
@Inherited
//
@Inherited
@Deprecated
//
@Deprecated
public
@interface
JobHandler
{
//
public @interface JobHandler {
//
String
value
();
//
String value();
//
}
//
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment