Looks like this code relies on @StepScope annotation which should create reader bean during spring batch job launching but reader bean creates during application starts instead.
One of the fix is to prevent JobLauncherApplicationRunner class trigger spring batch job when application starts by adding spring.batch.job.enabled=false to application.properties.