gpt4 book ai didi

java - 如何从其他应用程序检索 Spring-batch 作业历史记录?

转载 作者:行者123 更新时间:2023-11-30 09:24:52 25 4
gpt4 key购买 nike

我想在我的应用程序中创建一个 UI,用于调用 spring-batch(单独运行)作业并在该 UI 中显示作业详细信息,如历史记录等。您可以使用 REST 从其他应用程序调用 spring-batch 的作业。我们还可以类似地检索工作的其他信息(历史等)吗?

最佳答案

您可以在远程服务器上部署 spring batch admin 并使用它的 REST json API

/configuration  GET Form for upload of Job configuration file
/files GET List uploaded data files
/files POST Upload a new file (in a multipart form request) with path= and file= paremeters.
/files DELETE Remove a file that was previously uploaded. Add pattern= parameter to narrow down to a subset of existing resources.
/files/{path} GET Download a previously uploaded file. The path can contain directory separators.
/home GET List the resources available
/job-configuration POST Upload a Job configuration file as a String request body
/jobs GET List the jobs known to the application. If they are configured in this application they are launchable, otherwise not (i.e. if they have been executed offline)
/jobs/executions GET List all the job executions, in order of most recent to least.
/jobs/executions DELETE Stop all job executions
/jobs/executions/{jobExecutionId} GET Show the JobExecution with the id provided
/jobs/executions/{jobExecutionId} DELETE Stop the JobExecution with the id provided. Add abort=true parameter to abort an already stopped or failed job.
/jobs/executions/{jobExecutionId}/steps GET List the StepExecutions of the JobExecution with the id provided
/jobs/executions/{jobExecutionId}/steps/{stepExecutionId} GET Inspect the StepExecution with the id provided
/jobs/executions/{jobExecutionId}/steps/{stepExecutionId}/progress GET Monitor the progress of the StepExecution with the id provided
/jobs/{jobName} GET List the JobInstances of the job name provided
/jobs/{jobName} POST Execute the job with the name provided and parameters provided as a String (stringified Properties as per the CommandLineJobRunner)
/jobs/{jobName}/executions GET List the JobExecutions for the job name provided
/jobs/{jobName}/{jobInstanceId}/executions GET List the JobExecutions for the job instance with the id provided
/jobs/{jobName}/{jobInstanceId}/executions POST Stop the JobExecutions for the job instance with the id provided
/files.json GET
/home.json GET
/job-configuration.json POST
/job-restarts.json POST
/jobs.json GET
/jobs/executions.json GET
/jobs/executions.json DELETE
/jobs/executions/{jobExecutionId}.json GET
/jobs/executions/{jobExecutionId}.json DELETE
/jobs/executions/{jobExecutionId}/steps/{stepExecutionId}.json GET
/jobs/{jobName}.json GET
/jobs/{jobName}.json POST
/jobs/{jobName}/executions.json GET
/jobs/{jobName}/{jobInstanceId}.json GET
/jobs/{jobName}/{jobInstanceId}/executions.json POST

关于java - 如何从其他应用程序检索 Spring-batch 作业历史记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15503833/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com