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.git
The following commit(s) were added to refs/heads/master by this push:
new 7e9f271 For #1131 Translate spring-namespace (#1143)
7e9f271 is described below
commit 7e9f2717cca9863f690c7b3b11733002f5fa91d2
Author: 于玉桔 <[email protected]>
AuthorDate: Sat Jul 18 21:24:12 2020 +0800
For #1131 Translate spring-namespace (#1143)
---
.../usage/job-listener/spring-namespace.en.md | 31 +++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git
a/docs/content/user-manual/elasticjob-lite/usage/job-listener/spring-namespace.en.md
b/docs/content/user-manual/elasticjob-lite/usage/job-listener/spring-namespace.en.md
index e432ee4..3db5e09 100644
---
a/docs/content/user-manual/elasticjob-lite/usage/job-listener/spring-namespace.en.md
+++
b/docs/content/user-manual/elasticjob-lite/usage/job-listener/spring-namespace.en.md
@@ -4,4 +4,33 @@ weight = 3
chapter = true
+++
-TODO
+## Listener configuration
+
+```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:elasticjob="http://shardingsphere.apache.org/schema/elasticjob"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+
http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://shardingsphere.apache.org/schema/elasticjob
+
http://shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd
+ ">
+ <!-- Configuration job registration center -->
+ <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181"
namespace="my-job" base-sleep-time-milliseconds="1000"
max-sleep-time-milliseconds="3000" max-retries="3" />
+
+ <!-- Configuration Job Bean -->
+ <bean id="myJob" class="xxx.MyJob" />
+
+ <elasticjob:job id="${myJob.id}" job-ref="myJob"
registry-center-ref="regCenter" sharding-total-count="3" cron="0/1 * * * * ?">
+ <!-- Configure job listener -->
+ <elasticjob:listener class="xxx.MyJobListener" />
+ <elasticjob:distributed-listener
class="xxx.MyDistributeOnceJobListener" started-timeout-milliseconds="10000"
completed-timeout-milliseconds="20000" />
+ </elasticjob:job>
+</beans>
+```
+
+## Job start
+
+The xml that configures the Spring namespace is started through Spring, and
the job will be automatically loaded.
+