SpringBatch job run twice every time, but I want to run only once

Change application.properties

spring.batch.job.enabled=false, the default value is true

 

@EnableAutoConfiguration

For Spring Batch, a job is created by default, and all jobs in the context will be executed.

So if you only want to run it once, set it to false

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325026177&siteId=291194637
run