chrisgleissner / spring-batch-rest Goto Github PK
View Code? Open in Web Editor NEWREST API for Spring Batch using Spring Boot 2.2
License: Apache License 2.0
REST API for Spring Batch using Spring Boot 2.2
License: Apache License 2.0
Hey there, I don't have time to fix this so I figured I'd log some issues I found and some enhancement requests.
Calling /jobDetails/{quartzGroupName}/{quartzJobName}
For a job that doesn't exist returns a 500 error. I found the line it throws in the past, but can't recall - its pretty obvious - I think there is a filter that runs, then it calls .get(0) on the resulting structure which is empty, so it throws.
Also, {quartzGroupName} should now be made optional, and default to null. Internally, null will use the QuartzDefaultGroup, so if unspecified in the API/swagger would default to null=defaultGroup.
Ideally the API would return 404 with a response body indicating if the quartzGroupName was not found or if the quartzJobName was not found.
Hello,
when I start a job with the same parameter it cause an error 500.
I think It would be nice not to fail in this case. but catch the error and display it.
Error on the client side.
{
"timestamp": "2018-12-22T13:54:36.839+0000",
"status": 500,
"error": "Internal Server Error",
"message": "Failed to start personJob",
"trace": "java.lang.RuntimeException: Failed to start personJob\n\tat com.github.chrisgleissner.springbatchrest.util.adhoc.AdHocStarter.start(AdHocStarter.java:53)\n\tat com.github.chrisgleissner.springbatchrest.api.jobexecution.JobExecutionService.launch(JobExecutionService.java:74)\n...",
"path": "/jobExecutions"
}
Error on the server
rg.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={upperCase=true, additionalProp3=stringz, additionalProp2=string}. If you want to run this job again, change the parameters.
at org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution(SimpleJobRepository.java:132) ~[spring-batch-core-4.1.0.RELEASE.jar:4.1.0.RELEASE]
...
Hi,
I want to propose 2 changes in JobConfig
class, if possible:
In my project I have to use jackson-core:2.9.9
to work properly with other dependencies. To avoid an exception in that version, JobConfig
needs @NoArgsConstructor
and @AllArgsConstructor
annotations. Could be added?
All the properties in JobConfig
are String
values (Map<String, String> properties
), could you allow other types (i.e Map<String, Object> properties
) ?
Hello,
Is it possible to disable quartz? I just want to execute jobs by api request
Would be great if you could support back to Java 8. Possible?
Hi Chris:
Thanks for your open-source work of spring-batch-rest.
I fork it on the github as a new project and then I make it compatible with spring boot 1.5.3(the current version we used for work). After I plug it in an existed spring batch/boot application with mariadb backend, when I visit http://localhost:8130/jobs, I expect I will get the jobs stored in mariadb(ie: BATCH_JOB_INSTANCE), but I get no one.
Can you please give me some advices to make this work?
Thanks in advance.
I don't know whether this is an issue or a feature request
Spring boot 2.2.0 uses HATEOAS to version 1.0.0 which introduced breaking changes to HATEOAS.
Hey there, I don't have time to fix this or add the feature so I figured I'd log some things that would be good additions to the project.
Now that JobParameters can be specified for scheduled jobs, it would be pretty straightforward via the structures you've setup to expose these via the API, so you can see the parameters that a scheduled job is configured to run for.
Would also be pretty cool to add an optional parameter/body to specify job parameters for a scheduled job that you're initiating via the REST API.
Hi, do you have any intention of setting up some kind of authentication to enter the Swagger page?
The Quarz Group Name seems to be hard-coded to "group".
How does one change this?
I assume since its exposed through the rest API there is some way to override it.. but looking at the class I'm sort of dense when it comes to how to do it.
Thanks for any help!
We'v a job that requires a creationDate as date parameter.
While JobParamUtil checks for date parameters, the issue seems to be that the properties map is never filled with date properties as the deserializer treats them as string by default.
Did I miss any way to force a date or is this feature currently not supported?
Looks like AdHocStarter takes a parameter "JobConfig" which is a member class of this library.
Docs state that this start() call takes generic Spring Batch Param types:
String, Job
Any information on how to correctly configure & use the JobConfig as a parameter to call start() would be very much appreciated.
Thanks for any help or clarification!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.