Reset state before each Spring scheduled (@Scheduled) run
问题 I have a Spring Boot Batch application that needs to run daily. It reads a daily file, does some processing on its data, and writes the processed data to a database. Along the way, the application holds some state such as the file to be read (stored in the FlatFileItemReader and JobParameters ), the current date and time of the run, some file data for comparison between read items, etc. One option for scheduling is to use Spring's @Scheduled such as: @Scheduled(cron = "${schedule}") public