Retro Eye care Haitian Deep Dark Default

To use the Spring namespace, user need to add the dependency of the elasticjob-spring module in the pom.xml file.

<dependency>
    <groupId>org.apache.shardingsphere.elasticjob</groupId>
    <artifactId>elasticjob-spring-namespace</artifactId>
    <version>${latest.release.version}</version>
</dependency>

Spring namespace: http://shardingsphere.apache.org/schema/elasticjob/elasticjob.xsd

Registry Center Configuration

<elasticjob:zookeeper />

Configuration:

Name Required
id Yes
server-lists Yes
namespace Yes
base-sleep-time-milliseconds No
max-sleep-time-milliseconds No
max-retries No
session-timeout-milliseconds No
connection-timeout-milliseconds No
digest No

Job Configuration

<elasticjob:job />

Configuration:

Name Required
id Yes
class No
job-ref No
registry-center-ref Yes
tracing-ref No
cron Yes
timeZone No
sharding-total-count Yes
sharding-item-parameters No
job-parameter No
monitor-execution No
failover No
misfire No
max-time-diff-seconds No
reconcile-interval-minutes No
job-sharding-strategy-type No
job-executor-service-handler-type No
job-error-handler-type No
job-listener-types No
description No
props No
disabled No
overwrite No
label No
static-sharding No
max-wait-millis No

Job Scanner Configuration

<elasticjob:job-scanner />

After declaring job configuration with @ElasticJobConfiguration, use the job scanner to register schedule or one-off jobs by base package automatically. A non-empty cron creates a ScheduleJobBootstrap which is scheduled automatically; an empty cron creates a OneOffJobBootstrap which must be triggered manually.

Configuration:

Name Required Description
id Yes Identify of the scanner in the Spring container
base-package Yes Base package to scan, single or comma-separated

Reference:

<elasticjob:job-scanner id="jobScanner" base-package="org.example.job" />

Event Tracing Configuration

<elasticjob:rdb-tracing />

Configuration:

Name Data Type Required Default Value Description
id String Yes The bean’s identify of the event tracing
data-source-ref DataSource No The bean’s name of the event tracing DataSource

Job Dump Configuration

<elasticjob:snapshot />

Configuration:

Name Data Type Required Default Value Description
id String Yes The identify of the monitoring service in the Spring container
registry-center-ref String Yes Registry center bean’s reference, need to the statement of the reg:zookeeper
dump-port String Yes Job dump port
usage: echo “dump@jobName” | nc 127.0.0.1 9888