Skip to content
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

@EnableEventBus should automatically find bean annotated method #293

Open
snicoll opened this issue Oct 21, 2016 · 1 comment
Open

@EnableEventBus should automatically find bean annotated method #293

snicoll opened this issue Oct 21, 2016 · 1 comment

Comments

@snicoll
Copy link

snicoll commented Oct 21, 2016

As far as I understand, you can use @EventBusListenerMethod on bean methods and they'll be invoked as long as the class registers itself to the event bus.

Wouldn't it be better if that was transparent for Spring Beans? If you look at @EventListener in Spring Framework, all you have to do is place the annotation on a bean method. The code that gets the beans from the context and introspects them is here

Let me know if I can help.

@peholmst
Copy link
Owner

I like this idea. One problem is to know which event bus to subscribe to, since there are different event buses with different scopes. Maybe you could match the scope of the listener with the scope of the event bus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants