ArrayList cannot be cast to org.springframework.batch.core.JobParameter

后端 未结 2 698
一向
一向 2021-01-15 09:02

I want to send a list from rest client to rest web service which will start a job in Spring Batch. Is that possible or must I save the list in database/flatfile before start

2条回答
  •  一生所求
    2021-01-15 09:26

    Batch jobs are meant to be Time based not Event based. So, you can't pass the information from Rest service to your Job instance. Before you trigger the job in your controller method either write the list in temporary flat file or store it in a database, from where your Job can read it.

提交回复
热议问题