Files
spring-cloud-task/spring-cloud-task-samples/partitioned-batch-job
Glenn Renfro d2bc2530cc Update Task to BOOT 2.1.M1
Migrating to use ApplicationContextRunner or ImportAutoConfiguration with SpringApp.run, instead of SpringApplicationBuilder, because builder does not handle AutoConfiguration properly

SimpleTaskAutoConfiguration now has an annotation AutoConfigureBefore the BatchTaskAutoConfig so that it is processed prior.  THis is so that that BatchTaskAutoConfig can create the appropriate beans

SimpleTaskAutoConfiguration has new annotations so that it is AutoConfigured after BindingServiceConfiguration and after SimpleTaskAutoConfiguration.  This is so that it does not attempt to start emitting messages before stream is ready and it can create the appropriate beans after SimpleTaskAutoConfiguration has run.

Renamed SimpleTaskConfiguration to SimpleTaskAutoConfiguration.

Task version updated to  2.1.0

Added missing headers

Updated documentation.

Deprecated EnableTask

Added ability to disable Task autoconfiguration.

Removed @EnableTask from tests

Resolves #439
Resolves #440
Resolves #448
Resolves #466
2018-11-01 10:43:31 -05:00
..
2018-11-01 10:43:31 -05:00
2018-11-01 10:43:31 -05:00

= Partitioned Job

An example of the usage of the `DeployerPartitionHandler` and
`DeployerStepExecutionHandler` to partition a Spring Batch job.

== Requirements:

* Java 7 or Above

== Build:

[source,shell,indent=2]
----
$ ./mvnw clean install
----

== Execute:

[source,shell,indent=2]
----
$ export SPRING_APPLICATION_JSON='{"spring":{"datasource":{"url":"jdbc:mysql://localhost:3306/<your database>","username":"<your username>","password":"<your password>","driverClassName":"org.mariadb.jdbc.Driver"}}}'
$ java -jar target/partitioned-batch-job-1.2.1.RELEASE.jar
----

NOTE: This example will use require a MySql RDBMS repository and currently uses the mariadb jdbc driver to connect.
You can changes this another driver based on your needs.

NOTE: Since this example uses the Spring Cloud Deployer Local to launch the partitions, you will need to establish the datasource settings using the SPRING_APPLICATION_JSON environment property as shown above.

== Dependencies:

A datasource (not in memory) must be configured based on normal Spring Boot conventions
(application.properties/application.yml/environment variables/etc).