DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Batch Processing Large Data Sets with Spring Boot and Spring Batch
  • Spring Boot Centralized Logging with Graylog
  • Actuator Enhancements: Spring Framework 6.2 and Spring Boot 3.4
  • How Spring Boot Starters Integrate With Your Project

Trending

  • When Caches Collide: Solving Race Conditions in Fare Updates
  • Building an AI Nutrition Coach With OpenAI, Gradio, and gTTS
  • Vibe Coding: Conversational Software Development - Part 2, In Practice
  • Run Scalable Python Workloads With Modal
  1. DZone
  2. Coding
  3. Frameworks
  4. Spring Batch Process XML Delete/Move Files After Processing

Spring Batch Process XML Delete/Move Files After Processing

This example covers multiple Spring Batch concepts that we need in most of our daily routine batch job implementations.

By 
Damodhara Palavali user avatar
Damodhara Palavali
·
Jul. 11, 19 · Code Snippet
Likes (2)
Comment
Save
Tweet
Share
17.5K Views

Join the DZone community and get the full member experience.

Join For Free

Image title

See how Spring Boot Batch Application saves an XML to the database and moves error/success files to error/success folder and archives error/success files.

This example covers multiple Spring Batch concepts that we need in most of our daily routine batch job implementations.

List of topics covered

Before going through this article, I assume you know about the basic concepts of Spring Boot, Batch, and how to create a project. This topic starts by creating classes required for the implementation of the current topic. If you are new to Spring batch, Spring Boot uses Spring Initializr to create projects. You can refer to the Spring Boot Documentation

List of topics covered:

  1. Multiple schedulers in one configuration

  2. Parse XML nested elements to DB

  3. Tasklet to move file

  4. Tasklet to archive and delete file

  5. StepExecutionListener

We are using Stax.

SQL to create table:

CREATE TABLE “TEST_VEHICLE1” 
 ( “ID” NUMBER(19,0) NOT NULL ENABLE, 
 “VEHICLENUMBER” VARCHAR2(10 BYTE), 
 “BRAND” VARCHAR2(100 BYTE), 
 “COUNTRY” VARCHAR2(100 BYTE), 
 “MODELNAME” VARCHAR2(35 BYTE), 
 “MODELYEAR” VARCHAR2(35 BYTE), 
 PRIMARY KEY (“ID”)
 ) ;

Go to GitHub for the complete code. Happy coding!

Spring Framework XML Spring Batch Spring Boot Processing

Opinions expressed by DZone contributors are their own.

Related

  • Batch Processing Large Data Sets with Spring Boot and Spring Batch
  • Spring Boot Centralized Logging with Graylog
  • Actuator Enhancements: Spring Framework 6.2 and Spring Boot 3.4
  • How Spring Boot Starters Integrate With Your Project

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: