You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring's @EventListener has a condition attribute that can use an SpEL expression to match:
@EventListener(condition = "#creationEvent.awesome")
public void handleOrderCreatedEvent(CreationEvent<Order> creationEvent) {
}
It would be super handy if @Subscriber could add the same support. This would allow for a better replacement to the pattern matching support that @Selector used to provide with the legacy reactor bus.
Also, we have an enumeration for our eventTypes to make it easier to find and maintain. Having the SpEL expression would allow us to match based on the actual enum value instead of needing to duplicate the string for the eventId (since you can't say value = MyEnum.name() in an annotation).
The text was updated successfully, but these errors were encountered:
Spring's
@EventListener
has acondition
attribute that can use an SpEL expression to match:It would be super handy if
@Subscriber
could add the same support. This would allow for a better replacement to the pattern matching support that@Selector
used to provide with the legacy reactor bus.Also, we have an enumeration for our eventTypes to make it easier to find and maintain. Having the SpEL expression would allow us to match based on the actual enum value instead of needing to duplicate the string for the eventId (since you can't say
value = MyEnum.name()
in an annotation).The text was updated successfully, but these errors were encountered: