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

Support registrating listener with multiple interface implementation #4633

Open
uyw4687 opened this issue Jul 14, 2024 · 1 comment
Open
Labels
status: waiting-for-triage Issues that we did not analyse yet type: bug

Comments

@uyw4687
Copy link

uyw4687 commented Jul 14, 2024

Please do a quick search on Github issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description
A clear and concise description of what the bug is about.
When one class implements multiple listener interfaces at once, it does not get registered without dedicated annotations.

Environment
Please provide as many details as possible: Spring Batch version, Java version, which database you use if any, etc
Applicable for all versions

Steps to reproduce
Steps to reproduce the issue.
Implement one class implementing ItemReadListener, ItemProcessListener, ItemWriteListener at once.
Then, Spring Batch tries to register with SimpleStepBuilder#listener(Object listener).
However, without explicit annotations like @BeforeRead, @OnProcessError, etc., it fails to register it.

Expected behavior
A clear and concise description of what you expected to happen.
Register the listener if it's implementing one of the interfaces.

Minimal Complete Reproducible example
Please provide a failing test or a minimal complete verifiable example that reproduces the issue.
Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.

@uyw4687
Copy link
Author

uyw4687 commented Jul 18, 2024

#1098 (comment)
It seems it's related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage Issues that we did not analyse yet type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant