-
Notifications
You must be signed in to change notification settings - Fork 160
Allow @Externalized
annotation to use SpEL expressions
#881
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
Comments
The routing target declared in an annotation is currently not processed at all, but used as is. You can currently already work around this limitation by providing a programmatic routing lookup by declaring a bean of type That said, we could pipe the routing target through the SpEL processing we already apply for the routing key. You'd have to use a SpEL expression such as |
I was able to do that with By the way love the work. Thanks for a great project 👍🏻 |
We now support SpEL expressions in routing targets for events to be externalized. Introduced a BrokerRouting.getTarget(Object) overload to allow access to the event object in the SpEL expression. To support those, event externalizers will have to call that method where they previously called ….getTarget().
This in place now. The latest snapshots should support SpEL expressions in the target definitions as well. |
@Externalized
annotation to use SpEL expressions
To benefit from the Support for SpEL expressions using the event when calculating the routing target. See spring-projects/spring-modulith#881 for details.
* Upgrade to Spring Modulith 1.3.1. * Add Spring Modulith 1.3's header support for externalization. * Pass event into externalization target calculation. To benefit from the Support for SpEL expressions using the event when calculating the routing target. See spring-projects/spring-modulith#881 for details. --------- Co-authored-by: Maciej Walkowiak <[email protected]>
* Upgrade to Spring Modulith 1.3.1. * Add Spring Modulith 1.3's header support for externalization. * Pass event into externalization target calculation. To benefit from the Support for SpEL expressions using the event when calculating the routing target. See spring-projects/spring-modulith#881 for details. --------- Co-authored-by: Maciej Walkowiak <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I have a Spring Boot Application. I am using spring Modulith and I want events to be externalized to AWS SQS. Everything works fine but the
@Externalized
annotation doesn't seem to be taking values fromapplication.yml
file. Below is the sample code.application.yml
FYI - I have verified the indentation and also that the queue exists. I am using the same placeholder on
@SqsListener
in my application and that works fine.Also hardcoding the queue name works.
Please suggest if I am doing something wrong, if not what would be the best way to use the
yml
file properties in@Externalized
annotationEdit 1 - This is the error that I am getting
I am using Spring 3.3.4 and below is a snippet of my pom consisting of modulith specific dependencies
The text was updated successfully, but these errors were encountered: