heanbian-elasticjob

Heanbian elasticjob component.

Лицензия

Лицензия

Группа

Группа

com.heanbian.block
Идентификатор

Идентификатор

heanbian-elasticjob
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

heanbian-elasticjob
Heanbian elasticjob component.
Ссылка на сайт

Ссылка на сайт

https://github.com/heanbian/heanbian-elasticjob
Система контроля версий

Система контроля версий

https://github.com/heanbian/heanbian-elasticjob

Скачать heanbian-elasticjob

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.heanbian.block/heanbian-elasticjob/ -->
<dependency>
    <groupId>com.heanbian.block</groupId>
    <artifactId>heanbian-elasticjob</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.heanbian.block/heanbian-elasticjob/
implementation 'com.heanbian.block:heanbian-elasticjob:1.0.1'
// https://jarcasting.com/artifacts/com.heanbian.block/heanbian-elasticjob/
implementation ("com.heanbian.block:heanbian-elasticjob:1.0.1")
'com.heanbian.block:heanbian-elasticjob:jar:1.0.1'
<dependency org="com.heanbian.block" name="heanbian-elasticjob" rev="1.0.1">
  <artifact name="heanbian-elasticjob" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.heanbian.block', module='heanbian-elasticjob', version='1.0.1')
)
libraryDependencies += "com.heanbian.block" % "heanbian-elasticjob" % "1.0.1"
[com.heanbian.block/heanbian-elasticjob "1.0.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.dangdang : elastic-job-lite-spring jar 2.1.5
org.springframework.boot : spring-boot-autoconfigure jar 2.4.2
org.springframework.boot : spring-boot-configuration-processor jar 2.4.2

Модули Проекта

Данный проект не имеет модулей.

heanbian-elasticjob

前提条件

JDK11+

pom.xml

具体版本,可以上Maven中央仓库查询

<dependency>
  <groupId>com.heanbian.block</groupId>
  <artifactId>heanbian-elasticjob</artifactId>
  <version>1.0.1</version>
</dependency>

使用示例

配置 application.yml

heanbian:
  elasticjob:
    zookeeper-nodes: 192.168.1.101:2181,192.168.1.102:2181,192.168.1.103:2181
    zookeeper-namespace: elasticjob_fgFDGdfg45435SDFsfb #自定义

Spring Boot 启动类添加注解:

@EnableElasticJob

Java代码片段:

@Component
@ElasticJobClient(cron = "*/10 * * * * ?")
public class TestTask implements SimpleJob {

	@Override
	public void execute(ShardingContext shardingContext) {

	}
}

说明:适用于 Spring Boot 项目。

Версии библиотеки

Версия
1.0.1
1.0.0