【发布时间】:2020-09-23 13:54:08
【问题描述】:
我想知道关于 Spring Boot @Retryable 注释的一些事情。
我想根据异常类型实现@RetryablemaxAttemps count,比如:
if Exception type is ExceptionA:
@Retryable(value = ExceptionA.class, maxAttempts = 2)
if Exception type is ExceptionB:
@Retryable(value = ExceptionB.class, maxAttempts = 5)
是否可以使用@Retryable注解,或者有什么建议?
【问题讨论】:
标签: java spring spring-boot spring-retry