October 2017
Intermediate to advanced
396 pages
10h 2m
English
In the Spring Framework, the Observer design pattern is used to implement event handling function of ApplicationContext. Spring provides us the ApplicationEvent class and ApplicationListener interface to enable event handling in Spring ApplicationContext. Any bean in your Spring application implements the ApplicationListener interface, it will receive an ApplicationEvent every time the ApplicationEvent is published by an event publisher. Here, the event publisher is the subject and the bean that implements ApplicationListener is the observer.
Now that we've seen Observer design pattern, let's turn to a different variant of it--Template design pattern.
Read now
Unlock full access