Reputation: 2981
We are using partitioner and it is annotated with @Scope(value="step") and has setter method which is annotated with @BeforeStep, but still framewowrk does not inject step execution object?
What we are doing wrong
Upvotes: 1
Views: 1063
Reputation: 4454
Did you register the partitioner as "listener" on the step? As soon as you are using Step-Scope, your Bean is hidden behind a proxy, which makes it impossible for spring to register it automatically as a step-listener (it should work if your bean is not "step-scoped").
It is explained here: Spring-batch @BeforeStep does not work with @StepScope
Upvotes: 2