Fix variables refs in AnnAwareRetryOpsInterceptor

- Update `AnnotationAwareRetryOperationsInterceptor` to read values from correct expression for `maxDelayExpression` and `multiplierExpression`
- Fix `SpelParseException Expression [#{30000}] @1: EL1043E: Unexpected token. Expected 'identifier' but was 'lcurly({)'`
This commit is contained in:
narugoyal
2022-04-07 19:01:10 +05:30
committed by GitHub
parent 27b0e7c4ca
commit 2ac83a2fba

View File

@@ -378,7 +378,7 @@ public class AnnotationAwareRetryOperationsInterceptor implements IntroductionIn
long max = backoff.maxDelay();
String maxDelayExpression = (String) attrs.get("maxDelayExpression");
if (StringUtils.hasText(maxDelayExpression)) {
if (ExpressionRetryPolicy.isTemplate(delayExpression)) {
if (ExpressionRetryPolicy.isTemplate(maxDelayExpression)) {
max = PARSER.parseExpression(resolve(maxDelayExpression), PARSER_CONTEXT)
.getValue(this.evaluationContext, Long.class);
}
@@ -389,7 +389,7 @@ public class AnnotationAwareRetryOperationsInterceptor implements IntroductionIn
double multiplier = backoff.multiplier();
String multiplierExpression = (String) attrs.get("multiplierExpression");
if (StringUtils.hasText(multiplierExpression)) {
if (ExpressionRetryPolicy.isTemplate(delayExpression)) {
if (ExpressionRetryPolicy.isTemplate(multiplierExpression)) {
multiplier = PARSER.parseExpression(resolve(multiplierExpression), PARSER_CONTEXT)
.getValue(this.evaluationContext, Double.class);
}