What is source in the Spring's ApplicationEvent?2020-02-26 java spring events
In Spring Framework classes that represent an event to be published by the
ApplicationEventPublisher and listened to by the
EventObject <- ApplicationEvent <- PayloadApplicationEvent.
My question is what is the non-nullable
source in the initial
EventObject constructor and all derived subclasses constructors?
Javadocs give a rather vague explanation that it is
"the object upon which the Event in question initially occurred".
Is it an associated domain entity or publisher service or something else?
Additionally, I am confused why is it required at all if
@EventListener states that
"Events can be ApplicationEvent instances as well as arbitrary objects"?
- What is the difference between JDK and JRE?
- What is the difference between public, protected, package-private and private in Java?
- What is reflection and why is it useful?
- What is a JavaBean exactly?
- What does "Could not find or load main class" mean?
- What is a serialVersionUID and why should I use it?
- What are the possible values of the Hibernate hbm2ddl.auto configuration and what do they do
- What exactly is Apache Camel?
- spring 4.2 application event is firing twice with Spring MVC , why?
- Why is Spring's ApplicationContext.getBean considered bad?