Setting a resource for Spring Batch reader from file system
<p>I'd like to adjust my code to make the <code>Spring Batch reader</code> to read the resource file not from class path, but from the file system (like C:\inputData.xml). Is there any way, how to make it? My current code looks like this and reads given <code>xml</code> file from resources folder just fine:</p>

<pre><code>@Bean
ItemReader&lt;FamilyBatchEntity&gt; xmlFamilyFileItemReader() {
    StaxEventItemReader&lt;FamilyBatchEntity&gt; xmlFileReader = new StaxEventItemReader&lt;&gt;();
    xmlFileReader.setResource(new ClassPathResource("inputData.xml"));
    xmlFileReader.setFragmentRootElementName("Familiendetails");

    Jaxb2Marshaller insurantMarshaller = new Jaxb2Marshaller();
    insurantMarshaller.setClassesToBeBound(FamilyBatchEntity.class);
    xmlFileReader.setUnmarshaller(insurantMarshaller);

    return xmlFileReader;
}
</code></pre>