Amit Kumar
Amit Kumar

Reputation: 85

Java Spring Boot Batch - Need some advise in design

I am a newbie in Java and trying to implement a Spring Boot batch application.

My requirement is like to check some data in database (one part) and delete if found (another part).

I am planning to implement Spring Boot batch for this.

I will have one job which will have 2 steps. If Step 1 find some data then only execute step 2? Can I achieve in Spring Boot Batch? Or what is the best way to achieve this keeping in mind I have to schedule this to run weekly.

enter image description here

Upvotes: 1

Views: 161

Answers (1)

cosmos
cosmos

Reputation: 2263

With just the scheduled job for find and delete records from DB, I don't suggest using Spring Batch. Spring has nice good way of doing it without Batch using scheduling-tasks. You can see example here. Use Spring Batch only if you need to run jobs in batch that can't be handled with normal operation.

If you need complex scheduler, you can use Spring Quartz scheduler.

Upvotes: 2

Related Questions