Im still studying spring batch and came across a scenario where i need to pass a jobParameter to a custom bean. The job parameter contains a path of a file.
Here is how my context looks like:
<bean id="myBean" class=".....MyBean">
<property name="path" value="file:#{jobParameters['PATH'}/fileName"/>
</bean>
This is already included in a step scope from a reader that is not included here.
The question is. When the class is instantiated, the value passed to the bean is "file:#{jobParameters['PATH'}/fileName" instead the value of jobParameter passed when the job is invoked. It puzzles me since i've tried it on multiResourceReader in setting up the resource value and it is working fine. I'ts just i can't make it work on a custom bean. Any help woiuld be greatly appreciated.