@Retryable( value = { SQLException.class },maxAttempts = 2,backoff =
@Backoff(delay = 5000))
I to become something like this
@Retryable( value = { SQLException.class },maxAttempts =
"${applicationyml['myproperty']}",backoff = @Backoff(delay =
"${applicationyml['myproperty']}"))
Use maxAttemptsExpression
etc;
They can get property placeholders ${some.property}
where some.property
is in the YAML, or SpEL expressions
#{@someBean.someProperty}
Example here.
@Retryable(exceptionExpression = "#{@exceptionChecker.${retryMethod}(#root)}",
maxAttemptsExpression = "#{@integerFiveBean}", backoff = @Backoff(delayExpression = "#{${one}}",
maxDelayExpression = "#{${five}}", multiplierExpression = "#{${onePointOne}}"))
public void service3() {
...
}