You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/06 11:50:49 UTC
[shardingsphere-elasticjob-lite] branch master updated: Merge
namespace prefix to elasticjob (#969)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob-lite.git
The following commit(s) were added to refs/heads/master by this push:
new e834bcf Merge namespace prefix to elasticjob (#969)
e834bcf is described below
commit e834bcf6b5b790817f0b7c70a4606b3504f33a71
Author: Liang Zhang <te...@163.com>
AuthorDate: Mon Jul 6 19:50:29 2020 +0800
Merge namespace prefix to elasticjob (#969)
* Add elasticjob name prefix for spring namespace
* For xml format
* Merge spring namespace's xsd
---
README.md | 26 +++++--------
README_ZH.md | 26 +++++--------
docs/content/00-overview/intro.md | 17 +++++----
docs/content/01-start/dev-guide.md | 30 +++++++--------
docs/content/01-start/quick-start.md | 26 +++++--------
docs/content/02-guide/config-manual.md | 2 +-
docs/content/02-guide/dump.md | 26 +++++--------
docs/content/02-guide/job-reconcile.md | 22 +++++------
...andler.java => ElasticJobNamespaceHandler.java} | 12 ++++--
.../monitor/handler/MonitorNamespaceHandler.java | 32 ----------------
.../spring/reg/handler/RegNamespaceHandler.java | 32 ----------------
.../tracing/handler/TracingNamespaceHandler.java | 32 ----------------
.../META-INF/namespace/{job.xsd => elasticjob.xsd} | 43 +++++++++++++++++++++-
.../main/resources/META-INF/namespace/monitor.xsd | 36 ------------------
.../src/main/resources/META-INF/namespace/reg.xsd | 42 ---------------------
.../main/resources/META-INF/namespace/tracing.xsd | 35 ------------------
.../src/main/resources/META-INF/spring.handlers | 5 +--
.../src/main/resources/META-INF/spring.schemas | 5 +--
.../src/test/resources/META-INF/job/base.xml | 13 +++----
.../resources/META-INF/job/withEventTraceRdb.xml | 14 +++----
.../test/resources/META-INF/job/withJobHandler.xml | 14 +++----
.../src/test/resources/META-INF/job/withJobRef.xml | 16 ++++----
.../test/resources/META-INF/job/withListener.xml | 18 ++++-----
.../META-INF/job/withListenerAndCglib.xml | 28 +++++++-------
.../job/withListenerAndJdkDynamicProxy.xml | 28 +++++++-------
.../resources/META-INF/job/withoutListener.xml | 14 +++----
.../src/test/resources/META-INF/reg/regContext.xml | 14 +++----
.../main/resources/META-INF/applicationContext.xml | 36 ++++++++----------
28 files changed, 217 insertions(+), 427 deletions(-)
diff --git a/README.md b/README.md
index 359be1b..8265a42 100644
--- a/README.md
+++ b/README.md
@@ -94,29 +94,23 @@ public class MyElasticJob implements SimpleJob {
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
- xmlns:monitor="http://elasticjob.shardingsphere.apache.org/schema/monitor"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- http://elasticjob.shardingsphere.apache.org/schema/monitor
- http://elasticjob.shardingsphere.apache.org/schema/monitor/monitor.xsd
- ">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<!--configure registry center -->
- <reg:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
<!--configure monitor -->
- <monitor:embed id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
+ <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
<!--configure job class -->
<bean id="simpleJob" class="xxx.MyElasticJob" />
<!--configure job -->
- <job:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
</beans>
```
diff --git a/README_ZH.md b/README_ZH.md
index b4b81a8..1866708 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -86,29 +86,23 @@ public class MyElasticJob implements SimpleJob {
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
- xmlns:monitor="http://elasticjob.shardingsphere.apache.org/schema/monitor"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- http://elasticjob.shardingsphere.apache.org/schema/monitor
- http://elasticjob.shardingsphere.apache.org/schema/monitor/monitor.xsd
- ">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<!--配置作业注册中心 -->
- <reg:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
<!--配置任务监控 -->
- <monitor:embed id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
+ <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
<!--配置作业类 -->
<bean id="simpleJob" class="xxx.MyElasticJob" />
<!--配置作业 -->
- <job:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
</beans>
```
diff --git a/docs/content/00-overview/intro.md b/docs/content/00-overview/intro.md
index 17b4a2b..1ee4888 100644
--- a/docs/content/00-overview/intro.md
+++ b/docs/content/00-overview/intro.md
@@ -105,19 +105,20 @@ public class MyElasticJob implements SimpleJob {
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:reg="http://www.dangdang.com/schema/ddframe/reg"
- xmlns:job="http://www.dangdang.com/schema/ddframe/job"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.dangdang.com/schema/ddframe/reg
- http://www.dangdang.com/schema/ddframe/reg/reg.xsd
- http://www.dangdang.com/schema/ddframe/job
- http://www.dangdang.com/schema/ddframe/job/job.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
">
<!--配置作业注册中心 -->
- <reg:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <bean id="yourRefJobBeanId" class="xxx.MySimpleRefElasticJob">
+ <property name="fooService" ref="xxx.FooService"/>
+ </bean>
+
<!-- 配置作业-->
- <job:simple id="oneOffElasticJob" class="xxx.MyElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:job id="oneOffElasticJob" job-ref="yourRefJobBeanId" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
</beans>
```
diff --git a/docs/content/01-start/dev-guide.md b/docs/content/01-start/dev-guide.md
index 728c573..ed44e75 100644
--- a/docs/content/01-start/dev-guide.md
+++ b/docs/content/01-start/dev-guide.md
@@ -154,43 +154,39 @@ Root 对应 JobConfiguration,有2个子类分别对应Lite和Cloud部署类型
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:reg="http://www.dangdang.com/schema/ddframe/reg"
- xmlns:job="http://www.dangdang.com/schema/ddframe/job"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.dangdang.com/schema/ddframe/reg
- http://www.dangdang.com/schema/ddframe/reg/reg.xsd
- http://www.dangdang.com/schema/ddframe/job
- http://www.dangdang.com/schema/ddframe/job/job.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
">
<!--配置作业注册中心 -->
- <reg:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
<!-- 配置简单作业-->
- <job:simple id="simpleElasticJob" class="xxx.MySimpleElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:job id="simpleElasticJob" class="xxx.MySimpleElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
<bean id="yourRefJobBeanId" class="xxx.MySimpleRefElasticJob">
<property name="fooService" ref="xxx.FooService"/>
</bean>
<!-- 配置关联Bean作业-->
- <job:simple id="simpleRefElasticJob" job-ref="yourRefJobBeanId" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:job id="simpleRefElasticJob" job-ref="yourRefJobBeanId" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
<!-- 配置数据流作业-->
- <job:dataflow id="throughputDataflow" class="xxx.MyThroughputDataflowElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:job id="throughputDataflow" class="xxx.MyThroughputDataflowElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
<!-- 配置脚本作业-->
- <job:script id="scriptElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" script-command-line="/your/file/path/demo.sh" />
+ <elasticjob:job id="scriptElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" script-command-line="/your/file/path/demo.sh" />
<!-- 配置带监听的简单作业-->
- <job:simple id="listenerElasticJob" class="xxx.MySimpleListenerElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C">
- <job:listener class="xx.MySimpleJobListener"/>
- <job:distributed-listener class="xx.MyOnceSimpleJobListener" started-timeout-milliseconds="1000" completed-timeout-milliseconds="2000" />
- </job:simple>
+ <elasticjob:job id="listenerElasticJob" class="xxx.MySimpleListenerElasticJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C">
+ <elasticjob:listener class="xx.MySimpleJobListener"/>
+ <elasticjob:distributed-listener class="xx.MyOnceSimpleJobListener" started-timeout-milliseconds="1000" completed-timeout-milliseconds="2000" />
+ </elasticjob:job>
<!-- 配置带作业数据库事件追踪的简单作业-->
- <job:simple id="eventTraceElasticJob" class="xxx.MySimpleListenerElasticJob" registry-center-ref="regCenter" tracing-ref="yourDataSource" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C">
- </job:simple>
+ <elasticjob:job id="eventTraceElasticJob" class="xxx.MySimpleListenerElasticJob" registry-center-ref="regCenter" tracing-ref="yourDataSource" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
</beans>
```
diff --git a/docs/content/01-start/quick-start.md b/docs/content/01-start/quick-start.md
index 2135222..fccb302 100644
--- a/docs/content/01-start/quick-start.md
+++ b/docs/content/01-start/quick-start.md
@@ -93,30 +93,24 @@ public class JobDemo {
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
- xmlns:monitor="http://elasticjob.shardingsphere.apache.org/schema/monitor"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- http://elasticjob.shardingsphere.apache.org/schema/monitor
- http://elasticjob.shardingsphere.apache.org/schema/monitor/monitor.xsd
- ">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<!--配置作业注册中心 -->
- <reg:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
<!--配置任务监控 -->
- <monitor:embed id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
+ <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999" />
<!--配置作业类 -->
<bean id="simpleJob" class="xxx.MyElasticJob" />
<!--配置作业 -->
- <job:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" reconcile-interval-minutes="10" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" reconcile-interval-minutes="10" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
</beans>
```
diff --git a/docs/content/02-guide/config-manual.md b/docs/content/02-guide/config-manual.md
index 7378fd8..bd6d9c3 100644
--- a/docs/content/02-guide/config-manual.md
+++ b/docs/content/02-guide/config-manual.md
@@ -138,7 +138,7 @@ Spring 命名空间与 Java Code 方式配置类似,大部分属性只是将
### c. 监控配置
-#### monitor:embed命名空间属性详细说明
+#### monitor:monitor 命名空间属性详细说明
| 属性名 | 类型 | 是否必填 | 缺省值 | 描述 |
| ------------------------------- |:-------|:-------|:------|:--------------------------------------------------------------------------------------------------|
diff --git a/docs/content/02-guide/dump.md b/docs/content/02-guide/dump.md
index d408eb2..8251784 100644
--- a/docs/content/02-guide/dump.md
+++ b/docs/content/02-guide/dump.md
@@ -23,30 +23,24 @@ next = "/02-guide/job-listener/"
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
- xmlns:monitor="http://elasticjob.shardingsphere.apache.org/schema/monitor"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- http://elasticjob.shardingsphere.apache.org/schema/monitor
- http://elasticjob.shardingsphere.apache.org/schema/monitor/monitor.xsd
- ">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<!--配置作业注册中心 -->
- <reg:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
<!--配置任务监控 -->
- <monitor:embed id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
+ <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
<!--配置作业类 -->
<bean id="simpleJob" class="xxx.MyElasticJob" />
<!-- 配置作业-->
- <job:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
</beans>
```
diff --git a/docs/content/02-guide/job-reconcile.md b/docs/content/02-guide/job-reconcile.md
index b7ed81b..b0c26f9 100644
--- a/docs/content/02-guide/job-reconcile.md
+++ b/docs/content/02-guide/job-reconcile.md
@@ -17,25 +17,21 @@ next = "/02-guide/operation-manual/"
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- ">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<!--配置作业注册中心 -->
- <reg:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
-
<!--配置作业类 -->
<bean id="simpleJob" class="xxx.MyElasticJob" />
<!--配置作业 -->
- <job:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" reconcile-interval-minutes="10" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
+ <elasticjob:simple id="oneOffElasticJob" job-ref="simpleJob" registry-center-ref="regCenter" reconcile-interval-minutes="10" cron="0/10 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" />
</beans>
```
diff --git a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/job/handler/JobNamespaceHandler.java b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/ElasticJobNamespaceHandler.java
similarity index 61%
rename from elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/job/handler/JobNamespaceHandler.java
rename to elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/ElasticJobNamespaceHandler.java
index 2b7b8cf..771f9a2 100644
--- a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/job/handler/JobNamespaceHandler.java
+++ b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/ElasticJobNamespaceHandler.java
@@ -7,7 +7,7 @@
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,18 +15,24 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.lite.spring.job.handler;
+package org.apache.shardingsphere.elasticjob.lite.spring;
import org.apache.shardingsphere.elasticjob.lite.spring.job.parser.JobBeanDefinitionParser;
+import org.apache.shardingsphere.elasticjob.lite.spring.monitor.parser.MonitorBeanDefinitionParser;
+import org.apache.shardingsphere.elasticjob.lite.spring.reg.parser.ZookeeperBeanDefinitionParser;
+import org.apache.shardingsphere.elasticjob.lite.spring.tracing.parser.TracingBeanDefinitionParser;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
* Job handler for spring namespace.
*/
-public final class JobNamespaceHandler extends NamespaceHandlerSupport {
+public final class ElasticJobNamespaceHandler extends NamespaceHandlerSupport {
@Override
public void init() {
registerBeanDefinitionParser("job", new JobBeanDefinitionParser());
+ registerBeanDefinitionParser("zookeeper", new ZookeeperBeanDefinitionParser());
+ registerBeanDefinitionParser("monitor", new MonitorBeanDefinitionParser());
+ registerBeanDefinitionParser("rdb-event-trace", new TracingBeanDefinitionParser());
}
}
diff --git a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/handler/MonitorNamespaceHandler.java b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/handler/MonitorNamespaceHandler.java
deleted file mode 100644
index a1d4747..0000000
--- a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/handler/MonitorNamespaceHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.spring.monitor.handler;
-
-import org.apache.shardingsphere.elasticjob.lite.spring.monitor.parser.MonitorBeanDefinitionParser;
-import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
-
-/**
- * Monitor spring namespace handler.
- */
-public final class MonitorNamespaceHandler extends NamespaceHandlerSupport {
-
- @Override
- public void init() {
- registerBeanDefinitionParser("embed", new MonitorBeanDefinitionParser());
- }
-}
diff --git a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/reg/handler/RegNamespaceHandler.java b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/reg/handler/RegNamespaceHandler.java
deleted file mode 100644
index d42d226..0000000
--- a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/reg/handler/RegNamespaceHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.spring.reg.handler;
-
-import org.apache.shardingsphere.elasticjob.lite.spring.reg.parser.ZookeeperBeanDefinitionParser;
-import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
-
-/**
- * Registry center spring namespace handler.
- */
-public final class RegNamespaceHandler extends NamespaceHandlerSupport {
-
- @Override
- public void init() {
- registerBeanDefinitionParser("zookeeper", new ZookeeperBeanDefinitionParser());
- }
-}
diff --git a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/tracing/handler/TracingNamespaceHandler.java b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/tracing/handler/TracingNamespaceHandler.java
deleted file mode 100644
index ca5cd63..0000000
--- a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/tracing/handler/TracingNamespaceHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.spring.tracing.handler;
-
-import org.apache.shardingsphere.elasticjob.lite.spring.tracing.parser.TracingBeanDefinitionParser;
-import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
-
-/**
- * Tracing handler for spring namespace.
- */
-public final class TracingNamespaceHandler extends NamespaceHandlerSupport {
-
- @Override
- public void init() {
- registerBeanDefinitionParser("rdb-event-trace", new TracingBeanDefinitionParser());
- }
-}
diff --git a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/job.xsd b/elastic-job-lite-spring/src/main/resources/META-INF/namespace/elasticjob.xsd
similarity index 68%
rename from elastic-job-lite-spring/src/main/resources/META-INF/namespace/job.xsd
rename to elastic-job-lite-spring/src/main/resources/META-INF/namespace/elasticjob.xsd
index 2aaed8c..8e7f589 100644
--- a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/job.xsd
+++ b/elastic-job-lite-spring/src/main/resources/META-INF/namespace/elasticjob.xsd
@@ -16,11 +16,12 @@
~ limitations under the License.
-->
-<xsd:schema xmlns="http://elasticjob.shardingsphere.apache.org/schema/job"
+<xsd:schema xmlns="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:beans="http://www.springframework.org/schema/beans"
- targetNamespace="http://elasticjob.shardingsphere.apache.org/schema/job"
+ targetNamespace="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
elementFormDefault="qualified">
+
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd" />
<xsd:element name="listener">
@@ -67,4 +68,42 @@
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
+
+ <xsd:element name="zookeeper">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="beans:identifiedType">
+ <xsd:attribute name="server-lists" type="xsd:string" use="required" />
+ <xsd:attribute name="namespace" type="xsd:string" use="required" />
+ <xsd:attribute name="base-sleep-time-milliseconds" type="xsd:string" />
+ <xsd:attribute name="max-sleep-time-milliseconds" type="xsd:string" />
+ <xsd:attribute name="max-retries" type="xsd:string" />
+ <xsd:attribute name="session-timeout-milliseconds" type="xsd:string" />
+ <xsd:attribute name="connection-timeout-milliseconds" type="xsd:string" />
+ <xsd:attribute name="digest" type="xsd:string" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="rdb-event-trace">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="beans:identifiedType">
+ <xsd:attribute name="data-source-ref" type="xsd:string" use="required" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="monitor">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="beans:identifiedType">
+ <xsd:attribute name="registry-center-ref" type="xsd:string" use="required" />
+ <xsd:attribute name="monitor-port" type="xsd:string" default="-1" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
</xsd:schema>
diff --git a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/monitor.xsd b/elastic-job-lite-spring/src/main/resources/META-INF/namespace/monitor.xsd
deleted file mode 100644
index 43e47a2..0000000
--- a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/monitor.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsd:schema xmlns="http://elasticjob.shardingsphere.apache.org/schema/monitor"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:beans="http://www.springframework.org/schema/beans"
- targetNamespace="http://elasticjob.shardingsphere.apache.org/schema/monitor"
- elementFormDefault="qualified">
- <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd" />
-
- <xsd:element name="embed">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="beans:identifiedType">
- <xsd:attribute name="registry-center-ref" type="xsd:string" use="required" />
- <xsd:attribute name="monitor-port" type="xsd:string" default="-1" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
-</xsd:schema>
diff --git a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/reg.xsd b/elastic-job-lite-spring/src/main/resources/META-INF/namespace/reg.xsd
deleted file mode 100644
index cf021c0..0000000
--- a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/reg.xsd
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsd:schema xmlns="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:beans="http://www.springframework.org/schema/beans"
- targetNamespace="http://elasticjob.shardingsphere.apache.org/schema/reg"
- elementFormDefault="qualified">
- <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd" />
-
- <xsd:element name="zookeeper">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="beans:identifiedType">
- <xsd:attribute name="server-lists" type="xsd:string" use="required" />
- <xsd:attribute name="namespace" type="xsd:string" use="required" />
- <xsd:attribute name="base-sleep-time-milliseconds" type="xsd:string" />
- <xsd:attribute name="max-sleep-time-milliseconds" type="xsd:string" />
- <xsd:attribute name="max-retries" type="xsd:string" />
- <xsd:attribute name="session-timeout-milliseconds" type="xsd:string" />
- <xsd:attribute name="connection-timeout-milliseconds" type="xsd:string" />
- <xsd:attribute name="digest" type="xsd:string" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
-</xsd:schema>
diff --git a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/tracing.xsd b/elastic-job-lite-spring/src/main/resources/META-INF/namespace/tracing.xsd
deleted file mode 100644
index 6e1e2d1..0000000
--- a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/tracing.xsd
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<xsd:schema xmlns="http://elasticjob.shardingsphere.apache.org/schema/tracing"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:beans="http://www.springframework.org/schema/beans"
- targetNamespace="http://elasticjob.shardingsphere.apache.org/schema/tracing"
- elementFormDefault="qualified">
- <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd" />
-
- <xsd:element name="rdb-event-trace">
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="beans:identifiedType">
- <xsd:attribute name="data-source-ref" type="xsd:string" use="required" />
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
-</xsd:schema>
diff --git a/elastic-job-lite-spring/src/main/resources/META-INF/spring.handlers b/elastic-job-lite-spring/src/main/resources/META-INF/spring.handlers
index 7a2abac..c99cdfe 100644
--- a/elastic-job-lite-spring/src/main/resources/META-INF/spring.handlers
+++ b/elastic-job-lite-spring/src/main/resources/META-INF/spring.handlers
@@ -15,7 +15,4 @@
# limitations under the License.
#
-http\://elasticjob.shardingsphere.apache.org/schema/reg=org.apache.shardingsphere.elasticjob.lite.spring.reg.handler.RegNamespaceHandler
-http\://elasticjob.shardingsphere.apache.org/schema/job=org.apache.shardingsphere.elasticjob.lite.spring.job.handler.JobNamespaceHandler
-http\://elasticjob.shardingsphere.apache.org/schema/tracing=org.apache.shardingsphere.elasticjob.lite.spring.tracing.handler.TracingNamespaceHandler
-http\://elasticjob.shardingsphere.apache.org/schema/monitor=org.apache.shardingsphere.elasticjob.lite.spring.monitor.handler.MonitorNamespaceHandler
+http\://elasticjob.shardingsphere.apache.org/schema/elasticjob=org.apache.shardingsphere.elasticjob.lite.spring.ElasticJobNamespaceHandler
diff --git a/elastic-job-lite-spring/src/main/resources/META-INF/spring.schemas b/elastic-job-lite-spring/src/main/resources/META-INF/spring.schemas
index 6c5e23f..2e1c7d4 100644
--- a/elastic-job-lite-spring/src/main/resources/META-INF/spring.schemas
+++ b/elastic-job-lite-spring/src/main/resources/META-INF/spring.schemas
@@ -15,7 +15,4 @@
# limitations under the License.
#
-http\://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd=META-INF/namespace/reg.xsd
-http\://elasticjob.shardingsphere.apache.org/schema/job/job.xsd=META-INF/namespace/job.xsd
-http\://elasticjob.shardingsphere.apache.org/schema/tracing/tracing.xsd=META-INF/namespace/tracing.xsd
-http\://elasticjob.shardingsphere.apache.org/schema/monitor/monitor.xsd=META-INF/namespace/monitor.xsd
+http\://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd=META-INF/namespace/elasticjob.xsd
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/base.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/base.xml
index eec6ef3..01065bd 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/base.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/base.xml
@@ -19,20 +19,17 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:tracing="http://elasticjob.shardingsphere.apache.org/schema/tracing"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
- http://elasticjob.shardingsphere.apache.org/schema/tracing
- http://elasticjob.shardingsphere.apache.org/schema/tracing/tracing.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
">
<context:property-placeholder location="classpath:conf/job/conf.properties" />
- <reg:zookeeper id="regCenter" server-lists="${regCenter.serverLists}" namespace="${regCenter.namespace}" base-sleep-time-milliseconds="${regCenter.baseSleepTimeMilliseconds}"
+ <elasticjob:zookeeper id="regCenter" server-lists="${regCenter.serverLists}" namespace="${regCenter.namespace}" base-sleep-time-milliseconds="${regCenter.baseSleepTimeMilliseconds}"
max-sleep-time-milliseconds="${regCenter.maxSleepTimeMilliseconds}" max-retries="${regCenter.maxRetries}" />
<bean id="elasticJobTracingDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
@@ -41,7 +38,7 @@
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
- <tracing:rdb-event-trace id="elasticJobTrace" data-source-ref="elasticJobTracingDataSource" />
+ <elasticjob:rdb-event-trace id="elasticJobTrace" data-source-ref="elasticJobTracingDataSource" />
<bean id="foo" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.service.FooServiceImpl" />
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/withEventTraceRdb.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/withEventTraceRdb.xml
index bee4f97..422ae56 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/withEventTraceRdb.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/withEventTraceRdb.xml
@@ -18,21 +18,21 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- ">
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<import resource="base.xml"/>
<bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.FooSimpleElasticJob" />
<bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.DataflowElasticJob" />
- <job:job id="simpleElasticJob_namespace_event_trace_rdb" job-ref="fooJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
+ <elasticjob:job id="simpleElasticJob_namespace_event_trace_rdb" job-ref="fooJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
cron="${simpleJob.cron}" sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}" job-executor-service-handler-type="SINGLE_THREAD"
disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" />
- <job:job id="dataflowElasticJob_namespace_event_trace_rdb" job-ref="dataflowJob" registry-center-ref="regCenter"
+ <elasticjob:job id="dataflowElasticJob_namespace_event_trace_rdb" job-ref="dataflowJob" registry-center-ref="regCenter"
cron="0/1 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" job-error-handler-type="THROW" description="中文描述" overwrite="true" />
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobHandler.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobHandler.xml
index e4b1651..0038e72 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobHandler.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobHandler.xml
@@ -18,22 +18,22 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- ">
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<import resource="base.xml"/>
<bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.FooSimpleElasticJob" />
<bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.DataflowElasticJob" />
- <job:job id="simpleElasticJob_namespace_job_handler" job-ref="fooJob" registry-center-ref="regCenter"
+ <elasticjob:job id="simpleElasticJob_namespace_job_handler" job-ref="fooJob" registry-center-ref="regCenter"
cron="${simpleJob.cron}" sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}" job-executor-service-handler-type="SINGLE_THREAD"
disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" />
- <job:job id="dataflowElasticJob_namespace_job_handler" job-ref="dataflowJob" registry-center-ref="regCenter"
+ <elasticjob:job id="dataflowElasticJob_namespace_job_handler" job-ref="dataflowJob" registry-center-ref="regCenter"
cron="0/1 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" job-error-handler-type="THROW" description="中文描述"
overwrite="true" />
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobRef.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobRef.xml
index 7c73bed..8f956fc 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobRef.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/withJobRef.xml
@@ -18,12 +18,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- ">
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<import resource="base.xml"/>
<bean id="refSimpleJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.ref.RefFooSimpleElasticJob">
@@ -33,15 +33,15 @@
<property name="fooService" ref="foo" />
</bean>
- <job:job id="simpleElasticJob_job_ref" job-ref="refSimpleJob" registry-center-ref="regCenter"
+ <elasticjob:job id="simpleElasticJob_job_ref" job-ref="refSimpleJob" registry-center-ref="regCenter"
cron="${simpleJob.cron}" sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" job-executor-service-handler-type="SINGLE_THREAD" />
- <job:job id="dataflowElasticJob_job_ref" job-ref="refDataflowJob" registry-center-ref="regCenter"
+ <elasticjob:job id="dataflowElasticJob_job_ref" job-ref="refDataflowJob" registry-center-ref="regCenter"
cron="${dataflowJob.cron}" sharding-total-count="${dataflowJob.shardingTotalCount}" sharding-item-parameters="${dataflowJob.shardingItemParameters}"
overwrite="${dataflowJob.overwrite}">
<props>
<prop key="streaming.process">${dataflowJob.streamingProcess}</prop>
</props>
- </job:job>
+ </elasticjob:job>
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/withListener.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/withListener.xml
index a533861..65d4877 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/withListener.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/withListener.xml
@@ -18,25 +18,25 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
">
<import resource="base.xml"/>
<bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.FooSimpleElasticJob" />
<bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.DataflowElasticJob" />
- <job:job id="${simpleJob.id}" job-ref="fooJob" registry-center-ref="regCenter"
+ <elasticjob:job id="${simpleJob.id}" job-ref="fooJob" registry-center-ref="regCenter"
cron="${simpleJob.cron}" sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}">
- <job:listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleListener" />
- <job:distributed-listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleOnceListener" started-timeout-milliseconds="10000" completed-timeout-milliseconds="20000" />
- </job:job>
+ <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleListener" />
+ <elasticjob:distributed-listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleOnceListener" started-timeout-milliseconds="10000" completed-timeout-milliseconds="20000" />
+ </elasticjob:job>
- <job:job id="dataflowElasticJob_namespace_listener" job-ref="dataflowJob" registry-center-ref="regCenter"
+ <elasticjob:job id="dataflowElasticJob_namespace_listener" job-ref="dataflowJob" registry-center-ref="regCenter"
cron="0/1 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" description="中文描述"
overwrite="true" />
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndCglib.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndCglib.xml
index d0f855a..261326a 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndCglib.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndCglib.xml
@@ -19,17 +19,17 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop.xsd
- ">
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/aop
+ http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<context:component-scan base-package="org.apache.shardingsphere.elasticjob.lite.spring.fixture.aspect,org.apache.shardingsphere.elasticjob.lite.spring.fixture.service" />
<aop:aspectj-autoproxy proxy-target-class="true" />
@@ -38,16 +38,16 @@
<bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.FooSimpleElasticJob" />
<bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.DataflowElasticJob" />
- <job:job id="simpleElasticJob_namespace_listener_cglib" job-ref="fooJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
+ <elasticjob:job id="simpleElasticJob_namespace_listener_cglib" job-ref="fooJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
cron="${simpleJob.cron}" sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}">
- <job:listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleCglibListener" />
- </job:job>
- <job:job id="dataflowElasticJob_namespace_listener_cglib" job-ref="dataflowJob" registry-center-ref="regCenter"
+ <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleCglibListener" />
+ </elasticjob:job>
+ <elasticjob:job id="dataflowElasticJob_namespace_listener_cglib" job-ref="dataflowJob" registry-center-ref="regCenter"
cron="0/1 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" description="中文描述"
overwrite="true">
<props>
<prop key="streaming.process">true</prop>
</props>
- </job:job>
+ </elasticjob:job>
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
index 9b5572a..12ae3a2 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
@@ -19,17 +19,17 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop.xsd
- ">
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/aop
+ http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
<context:component-scan base-package="org.apache.shardingsphere.elasticjob.lite.spring.fixture.aspect,org.apache.shardingsphere.elasticjob.lite.spring.fixture.service" />
<aop:aspectj-autoproxy />
@@ -38,16 +38,16 @@
<bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.FooSimpleElasticJob" />
<bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.DataflowElasticJob" />
- <job:job id="simpleElasticJob_namespace_listener_jdk_proxy" job-ref="fooJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
+ <elasticjob:job id="simpleElasticJob_namespace_listener_jdk_proxy" job-ref="fooJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
cron="${simpleJob.cron}" sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}">
- <job:listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleJdkDynamicProxyListener" />
- </job:job>
- <job:job id="dataflowElasticJob_namespace_listener_jdk_proxy" job-ref="dataflowJob" registry-center-ref="regCenter"
+ <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.listener.SimpleJdkDynamicProxyListener" />
+ </elasticjob:job>
+ <elasticjob:job id="dataflowElasticJob_namespace_listener_jdk_proxy" job-ref="dataflowJob" registry-center-ref="regCenter"
cron="0/1 * * * * ?" sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" description="中文描述"
overwrite="true">
<props>
<prop key="streaming.process">true</prop>
</props>
- </job:job>
+ </elasticjob:job>
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/job/withoutListener.xml b/elastic-job-lite-spring/src/test/resources/META-INF/job/withoutListener.xml
index 764304e..4ffb023 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/job/withoutListener.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/job/withoutListener.xml
@@ -17,27 +17,27 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
">
<import resource="base.xml" />
<bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.FooSimpleElasticJob" />
<bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.fixture.job.DataflowElasticJob" />
- <job:job id="simpleElasticJob_namespace" job-ref="fooJob" registry-center-ref="regCenter"
+ <elasticjob:job id="simpleElasticJob_namespace" job-ref="fooJob" registry-center-ref="regCenter"
cron="${simpleJob.cron}" sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" />
- <job:job id="dataflowElasticJob_namespace" job-ref="dataflowJob" registry-center-ref="regCenter"
+ <elasticjob:job id="dataflowElasticJob_namespace" job-ref="dataflowJob" registry-center-ref="regCenter"
sharding-total-count="${dataflowJob.shardingTotalCount}" cron="${dataflowJob.cron}" sharding-item-parameters="${dataflowJob.shardingItemParameters}"
monitor-execution="${dataflowJob.monitorExecution}" failover="${dataflowJob.failover}" description="${dataflowJob.description}"
disabled="${dataflowJob.disabled}" overwrite="${dataflowJob.overwrite}">
<props>
<prop key="streaming.process">${dataflowJob.streamingProcess}</prop>
</props>
- </job:job>
+ </elasticjob:job>
</beans>
diff --git a/elastic-job-lite-spring/src/test/resources/META-INF/reg/regContext.xml b/elastic-job-lite-spring/src/test/resources/META-INF/reg/regContext.xml
index 31d5a68..d75fd2e 100644
--- a/elastic-job-lite-spring/src/test/resources/META-INF/reg/regContext.xml
+++ b/elastic-job-lite-spring/src/test/resources/META-INF/reg/regContext.xml
@@ -17,17 +17,17 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
">
<context:property-placeholder location="classpath:conf/reg/conf.properties" ignore-unresolvable="true" />
- <reg:zookeeper id="regCenter1" server-lists="${regCenter1.serverLists}" namespace="${regCenter1.namespace}" base-sleep-time-milliseconds="${regCenter1.baseSleepTimeMilliseconds}" max-sleep-time-milliseconds="${regCenter1.maxSleepTimeMilliseconds}" max-retries="${regCenter1.maxRetries}" />
- <reg:zookeeper id="regCenter2" server-lists="${regCenter2.serverLists}" namespace="${regCenter2.namespace}" base-sleep-time-milliseconds="${regCenter2.baseSleepTimeMilliseconds}" max-sleep-time-milliseconds="${regCenter2.maxSleepTimeMilliseconds}" max-retries="${regCenter2.maxRetries}" session-timeout-milliseconds="${regCenter2.sessionTimeoutMilliseconds}" connection-timeout-milliseconds="${regCenter2.connectionTimeoutMilliseconds}" digest="${regCenter2.digest}" />
+ <elasticjob:zookeeper id="regCenter1" server-lists="${regCenter1.serverLists}" namespace="${regCenter1.namespace}" base-sleep-time-milliseconds="${regCenter1.baseSleepTimeMilliseconds}" max-sleep-time-milliseconds="${regCenter1.maxSleepTimeMilliseconds}" max-retries="${regCenter1.maxRetries}" />
+ <elasticjob:zookeeper id="regCenter2" server-lists="${regCenter2.serverLists}" namespace="${regCenter2.namespace}" base-sleep-time-milliseconds="${regCenter2.baseSleepTimeMilliseconds}" max-sleep-time-milliseconds="${regCenter2.maxSleepTimeMilliseconds}" max-retries="${regCenter2.maxRetries}" session-timeout-milliseconds="${regCenter2.sessionTimeoutMilliseconds}" connection-timeout-milliseconds="${regCenter2.connectionTimeoutMilliseconds}" digest="${regCenter2.digest}" />
</beans>
diff --git a/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml b/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml
index f77aa76..0055559 100644
--- a/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml
+++ b/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml
@@ -18,55 +18,49 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:reg="http://elasticjob.shardingsphere.apache.org/schema/reg"
- xmlns:tracing="http://elasticjob.shardingsphere.apache.org/schema/tracing"
- xmlns:job="http://elasticjob.shardingsphere.apache.org/schema/job"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:elasticjob="http://elasticjob.shardingsphere.apache.org/schema/elasticjob"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
- http://elasticjob.shardingsphere.apache.org/schema/reg
- http://elasticjob.shardingsphere.apache.org/schema/reg/reg.xsd
- http://elasticjob.shardingsphere.apache.org/schema/tracing
- http://elasticjob.shardingsphere.apache.org/schema/tracing/tracing.xsd
- http://elasticjob.shardingsphere.apache.org/schema/job
- http://elasticjob.shardingsphere.apache.org/schema/job/job.xsd
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob
+ http://elasticjob.shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
">
<context:component-scan base-package="org.apache.shardingsphere.elasticjob.lite.example" />
<context:property-placeholder location="classpath:conf/*.properties" />
- <reg:zookeeper id="regCenter" server-lists="${serverLists}" namespace="${namespace}" base-sleep-time-milliseconds="${baseSleepTimeMilliseconds}" max-sleep-time-milliseconds="${maxSleepTimeMilliseconds}" max-retries="${maxRetries}" />
+ <elasticjob:zookeeper id="regCenter" server-lists="${serverLists}" namespace="${namespace}" base-sleep-time-milliseconds="${baseSleepTimeMilliseconds}" max-sleep-time-milliseconds="${maxSleepTimeMilliseconds}" max-retries="${maxRetries}" />
<bean id="elasticJobTracingDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
- <property name="driverClassName" value="${event.rdb.driver}"/>
- <property name="url" value="${event.rdb.url}"/>
- <property name="username" value="${event.rdb.username}"/>
- <property name="password" value="${event.rdb.password}"/>
+ <property name="driverClassName" value="${event.rdb.driver}" />
+ <property name="url" value="${event.rdb.url}" />
+ <property name="username" value="${event.rdb.username}" />
+ <property name="password" value="${event.rdb.password}" />
</bean>
- <tracing:rdb-event-trace id="elasticJobTrace" data-source-ref="elasticJobTracingDataSource" />
+ <elasticjob:rdb-event-trace id="elasticJobTrace" data-source-ref="elasticJobTracingDataSource" />
<bean id="simpleJob" class="org.apache.shardingsphere.elasticjob.lite.example.job.simple.SpringSimpleJob" />
<bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.example.job.dataflow.SpringDataflowJob" />
- <job:job id="${simple.id}" job-ref="simpleJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
+ <elasticjob:job id="${simple.id}" job-ref="simpleJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
sharding-total-count="${simple.shardingTotalCount}" cron="${simple.cron}" sharding-item-parameters="${simple.shardingItemParameters}" monitor-execution="${simple.monitorExecution}" failover="${simple.failover}" description="${simple.description}"
disabled="${simple.disabled}" overwrite="${simple.overwrite}" />
- <job:job id="${dataflow.id}" job-ref="dataflowJob" registry-center-ref="regCenter"
+ <elasticjob:job id="${dataflow.id}" job-ref="dataflowJob" registry-center-ref="regCenter"
sharding-total-count="${dataflow.shardingTotalCount}" cron="${dataflow.cron}" sharding-item-parameters="${dataflow.shardingItemParameters}" monitor-execution="${dataflow.monitorExecution}" failover="${dataflow.failover}" max-time-diff-seconds="${dataflow.maxTimeDiffSeconds}" description="${dataflow.description}"
disabled="${dataflow.disabled}" overwrite="${dataflow.overwrite}">
<props>
<prop key="streaming.process">${dataflow.streamingProcess}</prop>
</props>
- </job:job>
+ </elasticjob:job>
<!-- use absolute path to run script job -->
- <!--<job:job id="${script.id}" registry-center-ref="regCenter" -->
+ <!--<elasticjob:job id="${script.id}" registry-center-ref="regCenter" -->
<!--sharding-total-count="${script.shardingTotalCount}" cron="${script.cron}" sharding-item-parameters="${script.shardingItemParameters}" description="${script.description}" -->
<!--overwrite="${script.overwrite}">-->
<!--<props>-->
<!--<prop key="script.command.line">${script.scriptCommandLine}</prop>-->
<!--</props>-->
- <!--</job:job>-->
+ <!--</elasticjob:job>-->
</beans>