Issue:
Before my batch was not running automatically.
Solution:
I have changed the "spring-boot-starter-parent" version from 3.2.11 to 2.7.9.
- Main classor BatchConfig class -- add @EnableBatchProcessing
- BatchConfig.java -- add @Configuration
- Use below fields in BatchConfig.java :
@Autowired
private JobBuilderFactory jobBuilderFactory;
@Autowired
private StepBuilderFactory stepBuilderFactory;