Spring batch jobs from Web ui?

依然范特西╮ 提交于 2020-01-13 06:11:33

问题


Has anyone worked or has any experience with executing spring batch jobs from web UI. Currently I have written few jobs for data-copy from CSV to DB table, it runs fine from command prompt and in a JUnit test. But now these jobs have to be executed through web, JSF is being used as the front controller framework. Any suggestions about the best practices in this case would be very helpful.

Thanks!


回答1:


Spring Batch Admin is a deployable web frontend for your Spring Batch jobs. If all you want is a simple UI instead of a shell script for Administrators, take this approach:

http://static.springsource.org/spring-batch-admin/getting-started.html

If you're looking for a way to integrate the job trigger mechanism with your existing application, look at this implementation using Spring's JobLauncher which can be invoked from Controller/Servlet:

http://docs.spring.io/spring-batch/trunk/reference/html/configureJob.html#runningJobsFromWebContainer



来源:https://stackoverflow.com/questions/6119966/spring-batch-jobs-from-web-ui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!