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.
Assume an arrangement like this:
In this case,
TransactionalApplicationListenerMethodAdapteris invoked withMyClassas target class, butMyInterface.foo()as method. The annotation lookup then fails, as only the interface method is inspected, not the one on the target class.