Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot autowire a delegate ItemWriter defined with step scope [BATCH-1905] #1691
I have a problem when I try to
The exception is: There are many candidates of type org.springframework...FlatFileItemWriter.
If I use the
My ItemWriter works as "delegate". I couldn't write items during the process because I need to process all the items first to do some operations.
Why do an ItemWriter cannot be autowired if this bean is defined with late-binding?
The code is:
LISTENER TO BUILD THE DIRECTORY NAME:
THE XML CONFIG OF THE JOB:
<job id="job1" xmlns="http://www.springframework.org/schema/batch" incrementer="incrementer">
<step id="step1" ..../>
<!-- Listener for the job -->
THE ITEM PROCESS CODE:
If I don't use the late-binding in the bean, there's no problem to autowired it.