首页 > 解决方案 > StepExecutionListener 没有输入内容,而 SkipPolicy 没有 jobExecutionContext

问题描述

我能够在类中获取 JobExecution 上下文,该类在 ExitStatus afterStep(StepExecution stepExecution) 方法中实现 StepExecutionListener。但是不确定如何获取失败的记录详细信息。

可以在实现 skipPolicy 的 skipPolicy 类中检索记录输入,但是我们无法识别作业参数,因为当时 JobExecutioContext 为空

#1- Where or in which place we need to write the error csv file? We need to the csv
    record info, error message, file name to be captured
#2 - Is it possible to get the csv record detail in StepExecutionListener class

谢谢

标签: spring

解决方案


推荐阅读