title: spring batch application failed to start
body: <p>I am getting below error while spring boot/batch application start up.</p>
  <p>Parameter 3 of method job in &quot;com.springbatch.demo.config.BatchConfig&quot; required a bean of type 'org.springframework.batch.item.ItemProcessor' that could not be found.</p>
  <p>Below is my config class code is, Please guide me if I am missing anything here.</p>
  <pre><code>package com.springbatch.demo.config;
  
  import org.springframework.batch.core.Job;
  import org.springframework.batch.core.Step;
  import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
  import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
  import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
  import org.springframework.batch.core.launch.support.RunIdIncrementer;
  import org.springframework.batch.item.ItemProcessor;
  import org.springframework.batch.item.ItemReader;
  import org.springframework.batch.item.ItemWriter;
  import org.springframework.batch.item.file.FlatFileItemReader;
  import org.springframework.batch.item.file.LineMapper;
  import org.springframework.batch.item.file.mapping.BeanWrapperFieldSetMapper;
  import org.springframework.batch.item.file.mapping.DefaultLineMapper;
  import org.springframework.batch.item.file.transform.DelimitedLineTokenizer;
  import org.springframework.beans.factory.annotation.Value;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.core.io.Resource;
  
  import com.springbatch.demo.model.User;
  
  @Configuration
  @EnableBatchProcessing
  public class BatchConfig {
      
      
      @Bean
      public Job job(JobBuilderFactory jobBuilderFactory,
              StepBuilderFactory stepBuilderFactory,
              ItemReader&lt;User&gt; itemReader,
              ItemProcessor&lt;User, User&gt; itemProcessor,
              ItemWriter&lt;User&gt; itemWriter) {
          
          Step step=stepBuilderFactory.get(&quot;Data-File-Load&quot;)
                  .&lt;User,User&gt;chunk(100)
                  .reader(itemReader)
                  .processor(itemProcessor)
                  .writer(itemWriter)
                  .build();
          return jobBuilderFactory.get(&quot;Data-Loader&quot;)
                  .incrementer(new RunIdIncrementer())
                  .start(step).build();
      }
      
      @Bean
      public FlatFileItemReader&lt;User&gt; itemReader(@Value(&quot;{input}&quot;) Resource resource){
          
          FlatFileItemReader&lt;User&gt; fileItemReader=new FlatFileItemReader&lt;User&gt;();
          fileItemReader.setResource(resource);
          fileItemReader.setLinesToSkip(1);
          fileItemReader.setLineMapper(lineMapper());
          return fileItemReader;
      }
      
      @Bean
      public LineMapper&lt;User&gt; lineMapper(){
          
          DefaultLineMapper&lt;User&gt; defaluDefaultLineMapper=new DefaultLineMapper&lt;User&gt;();
          DelimitedLineTokenizer delimaDelimitedLineTokenizer=new DelimitedLineTokenizer();
          delimaDelimitedLineTokenizer.setDelimiter(&quot;,&quot;);
          delimaDelimitedLineTokenizer.setStrict(false);
          delimaDelimitedLineTokenizer.setNames(new String[] {&quot;id&quot;,&quot;name&quot;,&quot;dept&quot;,&quot;salary&quot;});
          defaluDefaultLineMapper.setLineTokenizer(delimaDelimitedLineTokenizer);
          BeanWrapperFieldSetMapper&lt;User&gt; fieldMapper=new BeanWrapperFieldSetMapper&lt;User&gt;();
          fieldMapper.setTargetType(User.class);
          defaluDefaultLineMapper.setFieldSetMapper(fieldMapper);
          
          return defaluDefaultLineMapper;
      }
  
  }
  </code></pre>