MCPcopy Index your code
hub / github.com/arey/spring-batch-toolkit

github.com/arey/spring-batch-toolkit @spring-batch-toolkit-4.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release spring-batch-toolkit-4.0.0 ↗ · + Follow
147 symbols 286 edges 31 files 52 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Spring Batch Toolkit

This toolkit provides additional features to the Spring Batch framework.

Features

  • Tasklet used to delete data from Spring Batch Metadata tables that are N months old.
  • Elasticsearch tasklets, processor and writer to create/setup/delete indices and write documents.
  • Logging Spring Batch listener
  • Spring Integration Endpoints that launch jobs, wait the end of a job and send email with job information.
  • Tasklet that uncompress a zip file to a working directory.
  • Tasklet that deletes a directory recursively.

Quick Start

Download the jar though Maven:

<dependency>
  <groupId>com.javaetmoi.core</groupId>
  <artifactId>spring-batch-toolkit</artifactId>
  <version>1.0.1</version>
</dependency> 

The Spring Batch Toolkit artefacts are available from Maven Central

Maven Central

Use the below compatibility matrix to choose the appropriated version:

spring-batch-toolkit spring-batch spring-framework elasticsearch Release date
4.0-SNAPSHOT 4.0 5.0 6.0
1.0.1 2.2 - 3.x 4.0 - 4.x 4.2.3 2015-06-15
0.1.0 2.0 - 2.1 3.0 - 3.x N/A 2013-07-10

Contributing to Spring Batch Tookit

  • Github is for social coding platform: if you want to write code, we encourage contributions through pull requests from forks of this repository. If you want to contribute code this way, please reference a GitHub ticket as well covering the specific issue you are addressing.

Development environment installation

Download the code with git: git clone git://github.com/arey/spring-batch-toolkit.git

Compile the code with maven: mvn clean install

If you're using an IDE that supports Maven-based projects (IntelliJ Idea, Netbeans or m2Eclipse), you can import the project directly from its POM. Otherwise, generate IDE metadata with the related IDE maven plugin: mvn eclipse:clean eclipse:eclipse

Unit test execution

By upgrading the Elasticsearch version from 2.1 to 6.0, we used to migrate the unit tests in charge of testing Elasticsearch tasklets et writers. They now inherit from the ESIntegTestCase class provided by the org.elasticsearch.test:framework artefact.

At startup, Elasticsearch checks for duplicate class files across the classpath causing "jar hell". All duplicated classes have been excluded from the pom.xml. For running theses tests from IntelliJ IDEA, you have to do some tricks. See the Elasticsearch Contributing guide

Documentation

French articles on the javaetmoi.com blog:

Release Note

VersionRelease dateFeatures
4.0.0-SNAPSHOT2017-12-14 Spring Batch 4.0 upgrade Spring Framework 5.0 support Elasticsearch 6.0 upgrade
1.0.12015-08-29 Spring Framework 4.2 support
1.0.02015-06-15 Spring Batch 3.0 upgrade Spring Batch Integration and Admin Endpoints Add UncompressTasklet and DeleteDirectoryTasklet
0.2.02013-11-05 Spring Batch 2.2 upgrade Elasticsearch tasklets and writer Logging Spring Batch listener
0.1.02013-07-10 RemoveSpringBatchHistoryTasklet, partitioning and parallel steps

Credits

  • Uses Maven as a build tool
  • Uses Cloudbees and Travis CI for continuous integration builds whenever code is pushed into GitHub

Build Status

Travis: Build
Status

Cloudbees Jenkins: Build
Status

Coverage Status: Coverage Status

Extension points exported contracts — how you extend this code

FileToJobNameConverter (Interface)
Retrieve a job name from a file.
src/main/java/com/javaetmoi/core/batch/integration/FileToJobNameConverter.java

Core symbols most depended-on inside this repo

getQuery
called by 6
src/main/java/com/javaetmoi/core/batch/tasklet/RemoveSpringBatchHistoryTasklet.java
setIndexName
called by 5
src/main/java/com/javaetmoi/core/batch/writer/EsDocumentWriter.java
setEsClient
called by 4
src/main/java/com/javaetmoi/core/batch/writer/EsDocumentWriter.java
init
called by 2
src/main/java/com/javaetmoi/core/batch/integration/JobExitStatusRouter.java
route
called by 2
src/main/java/com/javaetmoi/core/batch/integration/JobExitStatusRouter.java
getJobName
called by 2
src/main/java/com/javaetmoi/core/batch/integration/AcceptOnceFilePerJobListFilter.java
getJobNameFromFile
called by 2
src/main/java/com/javaetmoi/core/batch/integration/FileToJobNameConverter.java
execute
called by 2
src/main/java/com/javaetmoi/core/batch/tasklet/UncompressTasklet.java

Shape

Method 114
Class 32
Interface 1

Languages

Java100%

Modules by API surface

src/test/java/com/javaetmoi/core/batch/witer/TestEsDocumentWriter.java9 symbols
src/main/java/com/javaetmoi/core/batch/writer/EsDocument.java9 symbols
src/main/java/com/javaetmoi/core/batch/integration/JobExitStatusRouter.java9 symbols
src/main/java/com/javaetmoi/core/batch/tasklet/CreateElasticIndexMappingTasklet.java8 symbols
src/test/java/com/javaetmoi/core/batch/test/Masterpiece.java7 symbols
src/main/java/com/javaetmoi/core/batch/writer/EsDocumentWriter.java7 symbols
src/main/java/com/javaetmoi/core/batch/tasklet/RemoveSpringBatchHistoryTasklet.java7 symbols
src/main/java/com/javaetmoi/core/batch/tasklet/CreateElasticIndexSettingsTasklet.java7 symbols
src/main/java/com/javaetmoi/core/batch/listener/LogStepListener.java7 symbols
src/test/java/com/javaetmoi/core/batch/test/Movie.java5 symbols
src/test/java/com/javaetmoi/core/batch/tasklet/TestCreateElasticIndexSettingsTasklet.java5 symbols
src/main/java/com/javaetmoi/core/batch/tasklet/DeleteElasticIndexTasklet.java5 symbols

For agents

$ claude mcp add spring-batch-toolkit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact