I\'m having Standalone spring batch job. This works perfectly fine when in JUNIT
@RunWith(SpringJUnit4ClassRunner.class) //@SpringApplicationConfiguration(cl
Michael's comment is working for me, I am also providing JavaConfig copy-paste alternative for lazy people like me :)
@Bean public StepScope stepScope() { final StepScope stepScope = new StepScope(); stepScope.setAutoProxy(true); return stepScope; }