Spring Batch 提供了一个侦听器,用于捕获发生块错误的时间(@AfterChunkError 注释或 ChunkListener.afterChunkError 接口)。两者都接收 ChunkContext 并且 API 表示:
参数: context- 包含导致底层回滚的异常的块上下文。
参数:
context- 包含导致底层回滚的异常的块上下文。
context
但是,我在 ChunkContext 接口上没有看到任何可以让我出现异常的内容。如何从 ChunkContext 获取相关异常?
spring-batch
spring-batch ×1