Implementation/ Guide on how to Disable Spring Batch(5.0.2) MetaData Tables Completely

225 Views Asked by At

We need to disable Spring Batch(latest) metadata tables completely, not even use of In-memory database alternatives.

Kindly Address below questions :-

Question 1 : Is it possible to completely Stop Spring Batch Metadata generation/persistence. If so please elaborate with sample implementation.

Question 2: Is it possible if we try via Spring Boot(3.1.1) Implementation by setting any property to restrict spring batch metadata generation.

We trying to create production level implementation.

Could you please guide us to restrict Spring batch Metadata generation either in Spring Batch or Spring Boot base Spring Batch Implementations.

In spring batch 4 , we achieve via MapJobRepositoryFactoryBean which is unfortunately removed in latest version of Spring batch(5.0.2) core package.

We also tried to create custom JobRespository Classes Implementing JobInstanceDao , JobStepExecutionDao , JobExecutionDao) but we face error related to step (Message : IllegalStateException: No Scope registered for scope name 'step')

And its also very complicated to understand (If you have any GitHub repository to refer, kindly share it).

Most of the articles in StackOverFlow , and other resources are referring to the solution achievable in Spring Batch 4.

StackOverFlow : How to disable spring batch 5 metadata table calls or entries

It symbolizes the same thing which are not able to achieve. It will be better if there is sample Implementation available either in maven or Gradle based.

1

There are 1 best solutions below

1
On

It should be easily possible to disable the use of metadata tables. Even use of in-memory database is going to put load on server.

Is the spring batch 5 works only with metadata tables?