New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queues property is not correctly resolved on the @org.springframework.amqp.rabbit.annotation.RabbitListener class #672
Comments
I think, the issue is in this file: Line 729 in ffff7d7
should be replaced by |
I think you have a point here! Indeed the I've just tested and confirmed that we are good to go with your suggestion!
But that's only the part of the solution for your. Since your expression is very complex there, you should be careful with all the required symbols to honor SpEL syntax. For now I'd suggest you as workaround as:
Pay attention to single quotes everywhere. Since after resolving the property placeholder, the result becomes something valuable for the SpEL and tries to be resolved against application context. As far as they all are Feel free to come back to us with the contribution on the matter! |
I don't think changing it I think we should simply document that the SpEL evaluation is done after the property placeholder resolution and must match the regex pattern My 2c. |
Gary, one more time. The
That
I would even say that we don't need that condition to check if that contains expression tokens or not.
So, I would even say that with the current logic we even restrict the user in possible expression variants. Well, I may see your concern to make such a change in the current GA release, but we definitely should reconsider it in the next FYI. I have just commented out the code:
And all our tests are passing. |
Fixes spring-projects#672 The `StandardBeanExpressionResolver` is based on the `TemplateAwareExpressionParser` which can parse any string to the `LiteralExpression` or to the `CompositeStringExpression` if template tokens (`#{` & `}`) are present in the source expression. This way we don't need to deal with literal concatenations within templated expression. The expression like `#{'foo.' + myBean.bar}` can be replaced with the `foo.#{myBean.bar}`
Fixes #672 The `StandardBeanExpressionResolver` is based on the `TemplateAwareExpressionParser` which can parse any string to the `LiteralExpression` or to the `CompositeStringExpression` if template tokens (`#{` & `}`) are present in the source expression. This way we don't need to deal with literal concatenations within templated expression. The expression like `#{'foo.' + myBean.bar}` can be replaced with the `foo.#{myBean.bar}`
The `StandardBeanExpressionResolver` is based on the `TemplateAwareExpressionParser` which can parse any string to the `LiteralExpression` or to the `CompositeStringExpression` if template tokens (`#{` & `}`) are present in the source expression. This way we don't need to deal with literal concatenations within templated expression. The expression like `#{'foo.' + myBean.bar}` can be replaced with the `foo.#{myBean.bar}` See: spring-projects/spring-amqp#672
The `StandardBeanExpressionResolver` is based on the `TemplateAwareExpressionParser` which can parse any string to the `LiteralExpression` or to the `CompositeStringExpression` if template tokens (`#{` & `}`) are present in the source expression. This way we don't need to deal with literal concatenations within templated expression. The expression like `#{'foo.' + myBean.bar}` can be replaced with the `foo.#{myBean.bar}` See: spring-projects/spring-amqp#672
The `StandardBeanExpressionResolver` is based on the `TemplateAwareExpressionParser` which can parse any string to the `LiteralExpression` or to the `CompositeStringExpression` if template tokens (`#{` & `}`) are present in the source expression. This way we don't need to deal with literal concatenations within templated expression. The expression like `#{'foo.' + myBean.bar}` can be replaced with the `foo.#{myBean.bar}` See: spring-projects/spring-amqp#672
When the "queues" value is configured via application.yml with conditionals inside, it is not correctly resolved
RabbitListenerIssue.zip
The text was updated successfully, but these errors were encountered: