Table of Contents
Part 1: Introduction and Functional SpecsPart 2: Java classes
Part 3: XML configuration
Part 4: Running the Application
Dependencies
- Spring core 3.1.0.RELEASE
- Spring Batch 2.1.8.RELEASE
- See pom.xml for details
Github
To access the source code, please visit the project's Github repository (click here)
Functional Specs
Before we start, let's define the application's specs as follows:- Import a list of comma-delimited records
- Import a list of fixed-length records
- Import a list of mixed-type records
- Jobs must be triggered using a web interface
- Display the imported records in a web interface
- Each record represents a user and its associated access levels
Here's our Use Case diagram:
The CSV Files
To visualize what we want to do, let's examine first the files that we plan to import:User Files
user1.csvThis file contains comma-separated value (CSV) records representing User records. Each line has the following tokens: username, first name, last name, password.
user2.csv
This file contains fixed-length records representing User records. Each line has the following tokens: username(positions 1-5), first name(6-9), last name(10-16), password(17-25).
user2.csv
This file contains comma-separated value and fixed-length records representing User records. Each line has the following tokens: username, first name, last name, password.
This file contains two types of CSV-records:
- DELIMITED-RECORD-A: uses the standard comma delimiter
- DELIMITED-RECORD-B: uses | delimiter
It also contains two types of fixed-length records:
- FIXED-RECORD-A: username(16-20), first name(21-25), last name(26-31), password(32-40)
- FIXED-RECORD-B: username(16-21), first name(22-27), last name(28-33), password(35-42)
Role Files
role1.csvThis file contains comma-separated value (CSV) records representing Role records. Each line has the following tokens: username and access level.
role2.csv
This file contains fixed-length records representing Role records. Each line has the following tokens: username and access level.
role3.csv
This file contains comma-separated value (CSV) records representing Role records. Each line has the following tokens: username and access level.
By now you should have a basic idea of the file formats that we will be importing. You must realize that all we want to do is import these files and display them on a web interface.
Diagrams
Here's the Class diagram:Here's the Activity Diagram:
Screenshots
Let's preview how the application will look like after it's finished. This is also a good way to clarify further the application's specs.Entry page
The entry page is the primary page that users will see. It contains a table showing user records and four buttons for adding, editing, deleting, and reloading data. All interactions will happen in this page.
Next
In the next section, we will write the Java classes. Click here to proceed.
Share the joy:
|
Subscribe by reader Subscribe by email Share
Very good introduction.
ReplyDeleteThanks
Rahul
Great intro,
ReplyDeleteThanking you
Abdelkarim
Good tutorial ...for beginers..but there is a problem in the repositry (https://github.com/krams915/spring-batch-tutorial/tree/)where you have stored your tutorial. One file is missing over there which is "persistence.xml".
ReplyDeletePlease also provide that file
Thanks
Good tutorials, and keep up your work.
ReplyDeleteThank you very much it helps me lot
ReplyDeleteNice Article..
ReplyDeleteThanks
Thanks
ReplyDeleteThanks for sharing nice blog post. I likes your post. Really it was read so interesting. Fashion bloggers in India
ReplyDeletelegit online dispensary shipping worldwide
ReplyDeleteAK-47
buy weed online
AK-47 dank vape
Afghan Kush
legit online dispensary shipping worldwide
Amnesia Haze
buy weed online
Buy Crystal Mеth Online
ReplyDeleteBuy Meth Online. Crystal mеth iѕ the common name fоr сrуѕtаl methamphetamine, a ѕtrоng аnd highly addictive drug that affects the central nеrvоuѕ ѕуѕtеm.
meth for sale, buy meth, buy crystal meth online, buy methamphetamine online, crystal meth online, buy crystal meth, order meth online
Awesome article! I want people to know just how good this information is in your article. It’s interesting, compelling content. Your views are much like my own concerning this subject 먹튀검증 It touched me a lot. I would love to hear your opinion on my site. Please come to the site I run once and leave a comment. Thank you.
ReplyDeleteCrystal mеth iѕ the common name fоr сrуѕtаl methamphetamine, a ѕtrоng аnd highly addictive drug that affects the central nеrvоuѕ ѕуѕtеm. meth for sale, buy meth, buy crystal meth online, buy methamphetamine online, crystal meth online, buy crystal meth, order meth online
ReplyDeleteѕtimulаnt drug dеrivеd frоm соса рlаnt lеаvеѕ. It еnhаnсеѕ thе еffесtѕ оf a brаin сhеmiсаl саllеd dораminе, lеаding tо a ѕеnѕе оf inсrеаѕеd еnеrgу аnd роwеr.Cocaine for sale, Buy Cocaine Online, cocain for sale, crack cocaine for sale, buying cocaine online, how to buy cocaine online, order cocaine online, how to buy cocain
ReplyDeletekütahya
ReplyDeletetunceli
ardahan
düzce
siirt
BR6UGQ
kd shoes
ReplyDeleteoff white
jordan 4
golden goose outlet
nike sb
yeezy
goyard bag
bape hoodie outlet
bape outlet
bape sta