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

TransactionalApplicationListenerMethodAdapter should find @TransactionalEventListener on target class method #31034

Closed
odrotbohm opened this issue Aug 11, 2023 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@odrotbohm
Copy link
Member

Assume an arrangement like this:

interface MyInterface {
  void foo();
}

class MyClass implements MyInterface {
  @TransactionalEventListener
  void foo() { … }
}

In this case, TransactionalApplicationListenerMethodAdapter is invoked with MyClass as target class, but MyInterface.foo() as method. The annotation lookup then fails, as only the interface method is inspected, not the one on the target class.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 11, 2023
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on in: core Issues in core modules (aop, beans, core, context, expression) labels Aug 12, 2023
@jhoeller jhoeller self-assigned this Aug 12, 2023
@jhoeller jhoeller added this to the 6.0.12 milestone Aug 12, 2023
@jhoeller jhoeller added the for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x label Aug 12, 2023
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x labels Aug 12, 2023
jhoeller added a commit that referenced this issue Aug 12, 2023
jhoeller added a commit that referenced this issue Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants