title: How to get access to job parameters from ItemReader, in Spring Batch?
body: <p>This is part of my <code>job.xml</code>:</p>
  
  <pre><code>&lt;job id="foo" job-repository="job-repository"&gt;
    &lt;step id="bar"&gt;
      &lt;tasklet transaction-manager="transaction-manager"&gt;
        &lt;chunk commit-interval="1"
          reader="foo-reader" writer="foo-writer"
        /&gt;
      &lt;/tasklet&gt;
    &lt;/step&gt;
  &lt;/job&gt;
  </code></pre>
  
  <p>This is the item reader:</p>
  
  <pre><code>import org.springframework.batch.item.ItemReader;
  import org.springframework.beans.factory.annotation.Value;
  import org.springframework.stereotype.Component;
  @Component("foo-reader")
  public final class MyReader implements ItemReader&lt;MyData&gt; {
    @Override
    public MyData read() throws Exception {
      //...
    }
    @Value("#{jobParameters['fileName']}")
    public void setFileName(final String name) {
      //...
    }
  }
  </code></pre>
  
  <p>This is what Spring Batch is saying in runtime:</p>
  
  <pre><code>Field or property 'jobParameters' cannot be found on object of 
  type 'org.springframework.beans.factory.config.BeanExpressionContext'
  </code></pre>
  
  <p>What's wrong here? Where I can read more about these mechanisms in Spring 3.0?</p>