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/28 11:20:24 UTC

[shardingsphere-elasticjob] branch master updated: Add test case for OneOffJobBootstrap with spring namespace #1115 (#1286)

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 d3aa36a  Add test case for OneOffJobBootstrap with spring namespace #1115 (#1286)
d3aa36a is described below

commit d3aa36a800a2265a25fec2d61c13e5d63de4f2ac
Author: Haitao Wang <dr...@sina.com>
AuthorDate: Tue Jul 28 19:20:13 2020 +0800

    Add test case for OneOffJobBootstrap with spring namespace #1115 (#1286)
---
 .../job/AbstractOneOffJobSpringIntegrateTest.java  | 84 ++++++++++++++++++++++
 ...OffJobSpringNamespaceWithEventTraceRdbTest.java | 28 ++++++++
 ...OneOffJobSpringNamespaceWithJobHandlerTest.java | 28 ++++++++
 ...JobSpringNamespaceWithListenerAndCglibTest.java | 28 ++++++++
 ...amespaceWithListenerAndJdkDynamicProxyTest.java | 28 ++++++++
 .../OneOffJobSpringNamespaceWithListenerTest.java  | 28 ++++++++
 .../job/OneOffJobSpringNamespaceWithRefTest.java   | 68 ++++++++++++++++++
 .../job/OneOffJobSpringNamespaceWithTypeTest.java  | 53 ++++++++++++++
 ...neOffJobSpringNamespaceWithoutListenerTest.java | 28 ++++++++
 ...nerAndCglib.xml => oneOffWithEventTraceRdb.xml} | 29 ++------
 ...stenerAndCglib.xml => oneOffWithJobHandler.xml} | 30 +++-----
 .../resources/META-INF/job/oneOffWithJobRef.xml    | 47 ++++++++++++
 .../resources/META-INF/job/oneOffWithJobType.xml   | 36 ++++++++++
 ...ListenerAndCglib.xml => oneOffWithListener.xml} | 31 +++-----
 ...AndCglib.xml => oneOffWithListenerAndCglib.xml} |  6 +-
 ...ml => oneOffWithListenerAndJdkDynamicProxy.xml} |  6 +-
 .../META-INF/job/oneOffWithoutListener.xml         | 43 +++++++++++
 .../META-INF/job/withListenerAndCglib.xml          |  2 +-
 .../job/withListenerAndJdkDynamicProxy.xml         |  2 +-
 19 files changed, 532 insertions(+), 73 deletions(-)

diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/AbstractOneOffJobSpringIntegrateTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/AbstractOneOffJobSpringIntegrateTest.java
new file mode 100644
index 0000000..e54db68
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/AbstractOneOffJobSpringIntegrateTest.java
@@ -0,0 +1,84 @@
+/*
+ * 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.namespace.job;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.elasticjob.infra.concurrent.BlockUtils;
+import org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.OneOffJobBootstrap;
+import org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobRegistry;
+import org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob;
+import org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.FooSimpleElasticJob;
+import org.apache.shardingsphere.elasticjob.lite.spring.namespace.test.AbstractZookeeperJUnit4SpringContextTests;
+import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.annotation.Resource;
+
+import static org.junit.Assert.assertTrue;
+
+@RequiredArgsConstructor
+public abstract class AbstractOneOffJobSpringIntegrateTest extends AbstractZookeeperJUnit4SpringContextTests {
+    
+    private final String simpleJobName;
+    
+    private final String throughputDataflowJobName;
+    
+    @Resource
+    private CoordinatorRegistryCenter regCenter;
+    
+    @Before
+    @After
+    public void reset() {
+        FooSimpleElasticJob.reset();
+        DataflowElasticJob.reset();
+    }
+    
+    @After
+    public void tearDown() {
+        JobRegistry.getInstance().shutdown(simpleJobName);
+        JobRegistry.getInstance().shutdown(throughputDataflowJobName);
+    }
+    
+    @Test
+    public void assertSpringJobBean() {
+        assertSimpleElasticJobBean();
+        assertThroughputDataflowElasticJobBean();
+    }
+    
+    private void assertSimpleElasticJobBean() {
+        OneOffJobBootstrap bootstrap = applicationContext.getBean(simpleJobName, OneOffJobBootstrap.class);
+        bootstrap.execute();
+        while (!FooSimpleElasticJob.isCompleted()) {
+            BlockUtils.waitingShortTime();
+        }
+        assertTrue(FooSimpleElasticJob.isCompleted());
+        assertTrue(regCenter.isExisted("/" + simpleJobName + "/sharding"));
+    }
+    
+    private void assertThroughputDataflowElasticJobBean() {
+        OneOffJobBootstrap bootstrap = applicationContext.getBean(throughputDataflowJobName, OneOffJobBootstrap.class);
+        bootstrap.execute();
+        while (!DataflowElasticJob.isCompleted()) {
+            BlockUtils.waitingShortTime();
+        }
+        assertTrue(DataflowElasticJob.isCompleted());
+        assertTrue(regCenter.isExisted("/" + throughputDataflowJobName + "/sharding"));
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithEventTraceRdbTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithEventTraceRdbTest.java
new file mode 100644
index 0000000..7514d1b
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithEventTraceRdbTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.namespace.job;
+
+import org.springframework.test.context.ContextConfiguration;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithEventTraceRdb.xml")
+public final class OneOffJobSpringNamespaceWithEventTraceRdbTest extends AbstractOneOffJobSpringIntegrateTest {
+
+    public OneOffJobSpringNamespaceWithEventTraceRdbTest() {
+        super("oneOffSimpleElasticJob_namespace_event_trace_rdb", "oneOffDataflowElasticJob_namespace_event_trace_rdb");
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithJobHandlerTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithJobHandlerTest.java
new file mode 100644
index 0000000..b3ee844
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithJobHandlerTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.namespace.job;
+
+import org.springframework.test.context.ContextConfiguration;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithJobHandler.xml")
+public final class OneOffJobSpringNamespaceWithJobHandlerTest extends AbstractOneOffJobSpringIntegrateTest {
+
+    public OneOffJobSpringNamespaceWithJobHandlerTest() {
+        super("oneOffSimpleElasticJob_namespace_job_handler", "oneOffDataflowElasticJob_namespace_job_handler");
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerAndCglibTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerAndCglibTest.java
new file mode 100644
index 0000000..0f7c421
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerAndCglibTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.namespace.job;
+
+import org.springframework.test.context.ContextConfiguration;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithListenerAndCglib.xml")
+public final class OneOffJobSpringNamespaceWithListenerAndCglibTest extends AbstractOneOffJobSpringIntegrateTest {
+
+    public OneOffJobSpringNamespaceWithListenerAndCglibTest() {
+        super("simpleElasticJob_namespace_listener_cglib", "dataflowElasticJob_namespace_listener_cglib");
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerAndJdkDynamicProxyTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerAndJdkDynamicProxyTest.java
new file mode 100644
index 0000000..1428f4b
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerAndJdkDynamicProxyTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.namespace.job;
+
+import org.springframework.test.context.ContextConfiguration;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithListenerAndJdkDynamicProxy.xml")
+public final class OneOffJobSpringNamespaceWithListenerAndJdkDynamicProxyTest extends AbstractOneOffJobSpringIntegrateTest {
+
+    public OneOffJobSpringNamespaceWithListenerAndJdkDynamicProxyTest() {
+        super("simpleElasticJob_namespace_listener_jdk_proxy", "dataflowElasticJob_namespace_listener_jdk_proxy");
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerTest.java
new file mode 100644
index 0000000..2ea93f7
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithListenerTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.namespace.job;
+
+import org.springframework.test.context.ContextConfiguration;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithListener.xml")
+public final class OneOffJobSpringNamespaceWithListenerTest extends AbstractOneOffJobSpringIntegrateTest {
+
+    public OneOffJobSpringNamespaceWithListenerTest() {
+        super("simpleElasticJob_namespace_listener", "dataflowElasticJob_namespace_listener");
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithRefTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithRefTest.java
new file mode 100644
index 0000000..b06599e
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithRefTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.namespace.job;
+
+import org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.OneOffJobBootstrap;
+import org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobRegistry;
+import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
+import org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.ref.RefFooSimpleElasticJob;
+import org.apache.shardingsphere.elasticjob.lite.spring.namespace.test.AbstractZookeeperJUnit4SpringContextTests;
+import org.apache.shardingsphere.elasticjob.infra.concurrent.BlockUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.test.context.ContextConfiguration;
+
+import javax.annotation.Resource;
+
+import static org.junit.Assert.assertTrue;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithJobRef.xml")
+public final class OneOffJobSpringNamespaceWithRefTest extends AbstractZookeeperJUnit4SpringContextTests {
+    
+    private final String oneOffSimpleJobName = "oneOffSimpleElasticJobRef";
+    
+    @Resource
+    private CoordinatorRegistryCenter regCenter;
+
+    @Before
+    @After
+    public void reset() {
+        RefFooSimpleElasticJob.reset();
+    }
+    
+    @After
+    public void tearDown() {
+        JobRegistry.getInstance().shutdown(oneOffSimpleJobName);
+    }
+    
+    @Test
+    public void assertSpringJobBean() {
+        OneOffJobBootstrap bootstrap = applicationContext.getBean(oneOffSimpleJobName, OneOffJobBootstrap.class);
+        bootstrap.execute();
+        assertOneOffSimpleElasticJobBean();
+    }
+
+    private void assertOneOffSimpleElasticJobBean() {
+        while (!RefFooSimpleElasticJob.isCompleted()) {
+            BlockUtils.waitingShortTime();
+        }
+        assertTrue(RefFooSimpleElasticJob.isCompleted());
+        assertTrue(regCenter.isExisted("/" + oneOffSimpleJobName + "/sharding"));
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithTypeTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithTypeTest.java
new file mode 100644
index 0000000..7bc4c10
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithTypeTest.java
@@ -0,0 +1,53 @@
+/*
+ * 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.namespace.job;
+
+import org.apache.shardingsphere.elasticjob.infra.concurrent.BlockUtils;
+import org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.OneOffJobBootstrap;
+import org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobRegistry;
+import org.apache.shardingsphere.elasticjob.lite.spring.namespace.test.AbstractZookeeperJUnit4SpringContextTests;
+import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
+import org.junit.After;
+import org.junit.Test;
+import org.springframework.test.context.ContextConfiguration;
+
+import javax.annotation.Resource;
+
+import static org.junit.Assert.assertTrue;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithJobType.xml")
+public final class OneOffJobSpringNamespaceWithTypeTest extends AbstractZookeeperJUnit4SpringContextTests {
+    
+    private final String scriptJobName = "oneOffScriptElasticJob_job_type";
+    
+    @Resource
+    private CoordinatorRegistryCenter regCenter;
+    
+    @After
+    public void tearDown() {
+        JobRegistry.getInstance().shutdown(scriptJobName);
+    }
+    
+    @Test
+    public void jobScriptWithJobTypeTest() {
+        OneOffJobBootstrap bootstrap = applicationContext.getBean(scriptJobName, OneOffJobBootstrap.class);
+        bootstrap.execute();
+        BlockUtils.sleep(1000L);
+        assertTrue(regCenter.isExisted("/" + scriptJobName + "/sharding"));
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithoutListenerTest.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithoutListenerTest.java
new file mode 100644
index 0000000..6747ed3
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/OneOffJobSpringNamespaceWithoutListenerTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.namespace.job;
+
+import org.springframework.test.context.ContextConfiguration;
+
+@ContextConfiguration(locations = "classpath:META-INF/job/oneOffWithoutListener.xml")
+public final class OneOffJobSpringNamespaceWithoutListenerTest extends AbstractOneOffJobSpringIntegrateTest {
+
+    public OneOffJobSpringNamespaceWithoutListenerTest() {
+        super("oneOffSimpleElasticJob", "oneOffDataflowElasticJob");
+    }
+}
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithEventTraceRdb.xml
similarity index 52%
copy from elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
copy to elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithEventTraceRdb.xml
index 8289914..ee5bc33 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithEventTraceRdb.xml
@@ -18,36 +18,21 @@
 
 <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:aop="http://www.springframework.org/schema/aop"
        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://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://www.springframework.org/schema/beans/spring-beans.xsd
                            http://shardingsphere.apache.org/schema/elasticjob
                            http://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" />
-    
     <import resource="base.xml"/>
     
     <bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.FooSimpleElasticJob" />
     <bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob" />
     
-    <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}">
-        <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.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>
-    </elasticjob:job>
+    <elasticjob:job id="oneOffSimpleElasticJob_namespace_event_trace_rdb" job-ref="fooJob" registry-center-ref="regCenter" tracing-ref="elasticJobTrace"
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}" job-executor-service-handler-type="SINGLE_THREAD"
+             disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" />
+    
+    <elasticjob:job id="oneOffDataflowElasticJob_namespace_event_trace_rdb" job-ref="dataflowJob" registry-center-ref="regCenter"
+             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/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobHandler.xml
similarity index 52%
copy from elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
copy to elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobHandler.xml
index 8289914..477d142 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobHandler.xml
@@ -18,36 +18,22 @@
 
 <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:aop="http://www.springframework.org/schema/aop"
        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://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://www.springframework.org/schema/beans/spring-beans.xsd
                            http://shardingsphere.apache.org/schema/elasticjob
                            http://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" />
-    
     <import resource="base.xml"/>
     
     <bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.FooSimpleElasticJob" />
     <bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob" />
     
-    <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}">
-        <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.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>
-    </elasticjob:job>
+    <elasticjob:job id="oneOffSimpleElasticJob_namespace_job_handler" job-ref="fooJob" registry-center-ref="regCenter"
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}" job-executor-service-handler-type="SINGLE_THREAD"
+             disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" />
+    
+    <elasticjob:job id="oneOffDataflowElasticJob_namespace_job_handler" job-ref="dataflowJob" registry-center-ref="regCenter"
+             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/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobRef.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobRef.xml
new file mode 100644
index 0000000..2fbf882
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobRef.xml
@@ -0,0 +1,47 @@
+<?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.
+  -->
+
+<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
+                           ">
+    <import resource="base.xml"/>
+    
+    <bean id="refSimpleJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.ref.RefFooSimpleElasticJob">
+        <property name="fooService" ref="foo" />
+    </bean>
+    <bean id="refDataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.ref.RefFooDataflowElasticJob">
+        <property name="fooService" ref="foo" />
+    </bean>
+    
+    <elasticjob:job id="oneOffSimpleElasticJobRef" job-ref="refSimpleJob" registry-center-ref="regCenter"
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
+             disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" job-executor-service-handler-type="SINGLE_THREAD" />
+    
+    <elasticjob:job id="oneOffDataflowElasticJob_job_ref" job-ref="refDataflowJob" registry-center-ref="regCenter"
+             sharding-total-count="${dataflowJob.shardingTotalCount}" sharding-item-parameters="${dataflowJob.shardingItemParameters}"
+             overwrite="${dataflowJob.overwrite}">
+        <props>
+            <prop key="streaming.process">${dataflowJob.streamingProcess}</prop>
+        </props>
+    </elasticjob:job>
+</beans>
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobType.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobType.xml
new file mode 100644
index 0000000..0be22cf
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithJobType.xml
@@ -0,0 +1,36 @@
+<?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.
+  -->
+
+<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
+                           ">
+    <import resource="base.xml"/>
+
+    <elasticjob:job id="oneOffScriptElasticJob_job_type" job-type="SCRIPT" registry-center-ref="regCenter"
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
+             disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" job-executor-service-handler-type="SINGLE_THREAD" >
+            <props>
+                <prop key="script.command.line">${script.scriptCommandLine}</prop>
+            </props>
+    </elasticjob:job>
+</beans>
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListener.xml
similarity index 55%
copy from elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
copy to elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListener.xml
index 8289914..c1bc44d 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListener.xml
@@ -18,36 +18,25 @@
 
 <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:aop="http://www.springframework.org/schema/aop"
        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://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://www.springframework.org/schema/beans/spring-beans.xsd
                            http://shardingsphere.apache.org/schema/elasticjob
                            http://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" />
-    
+                        ">
     <import resource="base.xml"/>
     
     <bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.FooSimpleElasticJob" />
     <bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob" />
     
-    <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}" 
+    <elasticjob:job id="simpleElasticJob_namespace_listener" job-ref="fooJob" registry-center-ref="regCenter"
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
              disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}">
-        <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.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>
+        <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.listener.SimpleListener" />
+        <elasticjob:distributed-listener class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.listener.SimpleOnceListener" started-timeout-milliseconds="10000" completed-timeout-milliseconds="20000" />
     </elasticjob:job>
+    
+    <elasticjob:job id="dataflowElasticJob_namespace_listener" job-ref="dataflowJob" registry-center-ref="regCenter"
+             sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" description="中文描述"
+             overwrite="true" />
 </beans>
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListenerAndCglib.xml
similarity index 88%
copy from elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
copy to elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListenerAndCglib.xml
index 8289914..01f529e 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListenerAndCglib.xml
@@ -30,7 +30,7 @@
                            http://shardingsphere.apache.org/schema/elasticjob
                            http://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" />
+    <context:component-scan base-package="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.aspect,org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.service" />
     <aop:aspectj-autoproxy proxy-target-class="true" />
     
     <import resource="base.xml"/>
@@ -39,12 +39,12 @@
     <bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob" />
     
     <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}" 
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
              disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}">
         <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.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="中文描述" 
+             sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" description="中文描述"
              overwrite="true">
         <props>
             <prop key="streaming.process">true</prop>
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListenerAndJdkDynamicProxy.xml
similarity index 88%
copy from elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
copy to elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListenerAndJdkDynamicProxy.xml
index 537b35b..a788fdd 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithListenerAndJdkDynamicProxy.xml
@@ -30,7 +30,7 @@
                            http://shardingsphere.apache.org/schema/elasticjob
                            http://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" />
+    <context:component-scan base-package="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.aspect,org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.service" />
     <aop:aspectj-autoproxy />
     
     <import resource="base.xml" />
@@ -39,12 +39,12 @@
     <bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob" />
     
     <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}" 
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
              disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}">
         <elasticjob:listener class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.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="中文描述" 
+             sharding-total-count="3" sharding-item-parameters="0=A,1=B,2=C" description="中文描述"
              overwrite="true">
         <props>
             <prop key="streaming.process">true</prop>
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithoutListener.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithoutListener.xml
new file mode 100644
index 0000000..d7ff738
--- /dev/null
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/oneOffWithoutListener.xml
@@ -0,0 +1,43 @@
+<?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.
+  -->
+
+<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
+                        ">
+    <import resource="base.xml" />
+    
+    <bean id="fooJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.FooSimpleElasticJob" />
+    <bean id="dataflowJob" class="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob" />
+    
+    <elasticjob:job id="oneOffSimpleElasticJob" job-ref="fooJob" registry-center-ref="regCenter"
+             sharding-total-count="${simpleJob.shardingTotalCount}" sharding-item-parameters="${simpleJob.shardingItemParameters}"
+             disabled="${simpleJob.disabled}" overwrite="${simpleJob.overwrite}" />
+    <elasticjob:job id="oneOffDataflowElasticJob" job-ref="dataflowJob" registry-center-ref="regCenter"
+             sharding-total-count="${dataflowJob.shardingTotalCount}" 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>
+    </elasticjob:job>
+</beans>
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
index 8289914..d50a9d2 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndCglib.xml
@@ -30,7 +30,7 @@
                            http://shardingsphere.apache.org/schema/elasticjob
                            http://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" />
+    <context:component-scan base-package="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.aspect,org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.service" />
     <aop:aspectj-autoproxy proxy-target-class="true" />
     
     <import resource="base.xml"/>
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
index 537b35b..90101cd 100644
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
+++ b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/test/resources/META-INF/job/withListenerAndJdkDynamicProxy.xml
@@ -30,7 +30,7 @@
                            http://shardingsphere.apache.org/schema/elasticjob
                            http://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" />
+    <context:component-scan base-package="org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.aspect,org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.service" />
     <aop:aspectj-autoproxy />
     
     <import resource="base.xml" />