Spring Boot @EventListener

With Vaadin 8 I used Spring Boot ApplicationEventPublisher and @EventListener annotation in views @UIScope @SpringView. Moving to Vaadin 12 now I use @Route “MainView extends AppLayout implements RouterLayout” and sub-route “@Route(value=“admin”, layout=MainView.class)”. So, the only way to make @EventListener work is making this sub-route a Spring component. If I set annotation @SpringComponent, it become persistent, which I don’t like. I like its approach when switching tabs in AppLayout first creates, then destroys sub-route. Changing sub-route’s scope to @Scope(“request”) creates a new instance of sub-route at each call of @EventListener method. What’s the best way to implement proper event handling from server-side? I like Spring’s ApplicationEventPublisher but don’t see a way how to use it in sub-route. For main view I just declared it as @SpringComponent @UIScope and @EventListener works as expected. This question is also related to https://vaadin.com/forum/thread/17487924/push-when-to-use.

Did you ever figure out a solution for this problem? I’ve got the same situation.