-
Notifications
You must be signed in to change notification settings - Fork 426
Closed
Description
Hi,
I tried to little bit enhance your nice example with the possibility to set the CSV file location from outside (instead of using the classpath).
If I modify the code from the ItemReader to
@Bean
@Scope("step")
public ItemReader<Person> reader() {
and then running the commandline (without any further changes!) I get following error:
... 37 more
Caused by: java.lang.IllegalStateException: No context holder available for step scope
at org.springframework.batch.core.scope.StepScope.getContext(StepScope.java:160)
at org.springframework.batch.core.scope.StepScope.get(StepScope.java:99)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:338)
... 43 more
From the Spring documentation, the scope should be available (because of the Batch annotation).
Do you have any hint/idea whats the problem?
Metadata
Metadata
Assignees
Labels
No labels