Why Spring Boot Batch job is running just one time?
问题 I'm using spring boot. I have a batch job which I've implemented with these classes : My main class is : @SpringBootApplication @ComponentScan("com.batch") @PropertySource("classpath:application.properties") public class Application { public static void main(String[] args) { SpringApplication.run(Application.class); } } My scheduler is : @Component @EnableScheduling public class JobScheduler { @Scheduled(fixedRate = 10000) public void runJob() { SpringApplication.run(MyBatchConfig.class); } }