gpt4 book ai didi

spring-batch - 如何在 Spring 批处理中重试 tasklet?

转载 作者:行者123 更新时间:2023-12-04 05:14:33 26 4
gpt4 key购买 nike

如何重试方法调用程序任务,我知道如果块任务失败,则可以选择重试,并且可以选择设置退避策略,但是,在方法调用程序任务 xsd 中,我找不到重试选项。如果失败,是否还有其他选择可以重试任务。

最佳答案

您可以使用 spring-retry 和 declarative retry ;只需申请 <aop:config>标记和配置拦截器。

To change the policies or listeners, you only need to inject an instance of RetryTemplate into the interceptor

关于spring-batch - 如何在 Spring 批处理中重试 tasklet?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18864162/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com