How to use Spring Batch Late Binding – Step Scope & Job Scope
Spring Batch Late Binding provides a solution for late binding Job’s Parameters with Beans’ properties. In the tutorial, JavaSampleApproach will introduce Spring Batch Late Binding cleary by a sample project.
Related Articles:
<!-- Abstract Parent Bean -->
<beans:bean id="parentBean" abstract="true">
<beans:property name="folder" value="${folder}"/>
<beans:property name="fileName" value="${inputFileName}"/>
</beans:bean>
The configuration uses a traditional approach:${folder}
& ${inputFileName}
folder & inputFileName must define in a configuration file, like application.properties:
folder=C:\\readfile
inputFileName=1.txt
Question: How to bind data between Job Parameters & Beans’ properties?
Answer: Spring Batch Late Binding with Job & Step attributes.
How to use Spring Batch Late Binding – Step Scope & Job Scope
#springbatch #springboot #job