Run Spring Batch Job programmatically?

前端 未结 3 1946
礼貌的吻别
礼貌的吻别 2021-02-02 15:50

I have a Spring Batch application, which I start with the CommandLineJobRunner. But now I have to embed this application into our corporate environment. There we ha

3条回答
  •  太阳男子
    2021-02-02 16:07

    JobLauncher can be used to invoke the Job programatically. JobLauncher can be autowired in your Servlet/Controller if you're looking for a way to trigger jobs from a webapp:

    http://docs.spring.io/spring-batch/reference/htmlsingle/#runningJobsFromWebContainer

提交回复
热议问题