@RequestMapping(value = "/batch", method = RequestMethod.GET)
public ModelAndView execute() {
ModelAndView model = new ModelAndView();
String[] springConfig = { "spring/batch/jobs/job-hello-world.xml" };
ApplicationContext context = new ClassPathXmlApplicationContext(springConfig);
JobLauncher jobLauncher = (JobLauncher) context.getBean("jobLauncher");
Job job = (Job) context.getBean("helloWorldJob");
model.setViewName("batch");
<p>
<a class="btn btn-primary btn-lg" href="http://localhost:8080/batch" role="button">Start batch</a>
</p>