Spring Batch - Filewriter Append Custom Date to File Name
<p>I am new to Spring batch and trying to append custom date(not today date) to output file. I could find samples to get job parameters &amp; job execution context in file writer step. But could not find solution for my scenario. Could someone help on this.
Given:
<code>&lt;bean id="abstractFileWriter"  class="org.springframework.batch.item.file.FlatFileItemWriter" abstract="true"&gt;
        &lt;property name="resource" value="file:\target\HelloWorld.{MMDDYYYY}.txt"/&gt;
        &lt;property name="shouldDeleteIfExists" value="true" /&gt;<br>
    &lt;/bean&gt;</code></p>

<p>Above file writer is parent for several steps which append data to same file.</p>

<p>Expected output is:
If {MMDDYYYY} is set to 01152016 then final output file name should be HelloWord.01152016.txt.</p>

<p>If we need to pass resource by reference instead of value please share how.</p>

<p>Please advise.</p>