Skip to content

vipul-gorasiya/Spring-Custom-Event-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Spring Custom Event examples

How is it used in example

All Event Listener are listening to Email Event only. But are defined with @Order so all will execute in sequence defined in @Order.

  • EmailService - Event publisher defined by implementing ApplicationEventPublisherAware. This service publishes event which is subscribed by three aforementioned listeners.

Importing and running project

  1. Import project as Maven project
  2. Run application as Spring Boot Application
  3. Launch URL: "http://localhost:8080/sendEmail". This will call EmailController which calls EmailService in turn which publishes the event to send email.
  4. Observe log to see the sequence of event listener execution and relate it with different defined listeners

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages