Spring Batch FlatFileItemWriter - How to use stepExecution.jobId to generate file name

前端 未结 2 1900
不知归路
不知归路 2020-12-15 13:32

I have this FileWriter where I\'m trying to append the current Job Id to the filename that is generated.



        
2条回答
  •  醉酒成梦
    2020-12-15 13:51

    #{stepExecution.jobExecution.id} or #{stepExecution.jobExecutionId} should work though.

    The StepContext does provide access to the StepExecution for late binding via SpEL expressions.

提交回复
热议问题