-
Notifications
You must be signed in to change notification settings - Fork 24
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 DomaEventHandler #15
Conversation
Comments are welcome! |
Great idea! |
import org.springframework.context.ApplicationEventPublisher; | ||
import org.springframework.context.ApplicationEventPublisherAware; | ||
|
||
public class DomaEventEntityListener<T> extends /* ugly hack */NullEntityListener<T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to extend the NullEntityListener
class?
You can implement the EntityListener
interface directly.
Here are examples Lines 371 to 582 in 71d191a
|
Pros and Cons compared to
org.seasar.doma.jdbc.entity.EntityListener
Pros
@EventListener
Cons
Ugly hack
exists because@Entity
with default parameters usesNullEntityListener
and forcesEntityListenerProvider
to provideNullEntityListener
instance.Sample project