title: Getting No bean named 'jobLauncher' available exception
body: <p>Application started but got this exception </p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'jobLauncher' available
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)
      at com.hms.ar.batch.job.ARBatchJobApplication.main(ARBatchJobApplication.java:55)
  </code></pre>
  
  <p>I have tried creating spring.xml under resources folder
   and defined JobLauncher bean. still got same exception</p>
  
  <p>I have tried to @Autowire this bean. Still got same exception </p>
  
  <p>some of the codes in my main mathod</p>
  
  <pre><code>public static void main(String[] args) {
          savedArgs = args;
          String jobName = processParameters(args);
          ApplicationContext ctx = configureApplication(new SpringApplicationBuilder()).run(args);
          JobLauncher jobLauncher = (JobLauncher) ctx.getBean("jobLauncher");
          JobExplorer jobExplorer = (JobExplorer) ctx.getBean("jobExplorer");
          Job job = (Job) ctx.getBean(jobName);
  
  }
  </code></pre>
  
  <p>I expected my job to start but it's not starting because of this exception</p>