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

Change application.properties

spring.batch.job.enabled=false, 缺省值为true

@EnableAutoConfiguration

for Spring Batch, 缺省情况下会创建一个job, 在context中所有的jobs都会被执行。

因此如果只想运行一次,将其设为false

猜你喜欢

转载自my.oschina.net/u/3781047/blog/1803042
run
今日推荐