如何使弹簧@retryable可配置?
2022-09-02 19:39:08
我有这段代码
@Retryable(maxAttempts = 3, stateful = true, include = ServiceUnavailableException.class,
exclude = URISyntaxException.class, backoff = @Backoff(delay = 1000, multiplier = 2) )
public void testThatService(String serviceAccountId)
throws ServiceUnavailableException, URISyntaxException {
这里的一些实现 }
有没有办法使用@Value来配置maxAttempts,延迟和乘法器?或者有没有其他方法可以使注释中的此类字段可配置?