title: Error : Field job in required a bean of type 'org.springframework.batch.core.Job' that could not be found
body: <p>I am a beginner with spring batch, and I developped a simple project with it . I am getting the error.</p>
  
  <pre><code>Description:
  Field job in com.example.demo.DemoApplication required a bean of type 
  'org.springframework.batch.core.Job' that could not be found.
  Action:
  Consider defining a bean of type 'org.springframework.batch.core.Job' in your 
  configuration.
  </code></pre>
  
  <p>Here is my code,  I have just one class :</p>
  
  <pre><code>'package com.example.demo;
  
  
  import org.springframework.batch.core.Job;
  import org.springframework.batch.core.JobParameters;
  import org.springframework.batch.core.JobParametersBuilder;
  import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
  import org.springframework.batch.core.launch.JobLauncher;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.scheduling.annotation.EnableScheduling;
  import org.springframework.scheduling.annotation.Scheduled;
  
  @SpringBootApplication
  @EnableScheduling
  @EnableBatchProcessing
  public class DemoApplication {
  
  
  
  @Autowired
  private JobLauncher jobLauncher;
  
  
   @Autowired
   private Job job;
  
  public static void main(String[] args) {
      SpringApplication.run(DemoApplication.class, args);
  }
  
  
   @Scheduled(cron = "0 */1 * * * ?")
      public void perform() throws Exception 
      {
          JobParameters params = new JobParametersBuilder()
                  .addString("JobID", String.valueOf(System.currentTimeMillis()))
                  .toJobParameters();
          jobLauncher.run(job, params);
      }
  
   }
  </code></pre>
  
  <p>Thanks for helping me to find the mainly cause of this error </p>