Download presentation
Presentation is loading. Please wait.
Published byBrendan Taylor Modified over 9 years ago
1
Spring-Batch Tutorial Getting Started Guide
2
Agenda Software prerequisites Creating new batch application Setting up database Running a job
3
Prerequisites JDK 1.4 or later Maven 2
4
Checkout & install the framework svn checkout https:// springframework.svn.sourceforge.net/ svnroot/springframework/ spring-batch/trunk spring-batch cd spring-batch mvn install
5
Download & Install framework Download snapshot from http://static.springframework.org/spring- batch/snapshots.html Manually install to local maven repository: mvn install:install-file -DgroupId=org.springframework.batch -DartifactId=spring-batch-execution -Dversion=M3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
6
Create a batch application Use the spring-batch-app archetype mvn archetype:create -DarchetypeGroupId=org.springframework.batch -DarchetypeArtifactId=spring-batch-app -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=org.myorganization -DartifactId=my-app-name
7
Setup the database Create a schema using SQL script from /src/main/resources/db-schema-scripts Edit JDBC connection properties in /src/main/resource/batch-jdbc.properties
8
Run a job cd path/to/my-app-name mvn test mvn exec:exec
9
Look behind the curtains src/main/resources/helloWorldJob.xml contains the job configuration pom.xml contains the maven’s exec plugin configuration which launches the job with appropriately configured classpath
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.