Skip to content

zzaoen/springdemos

Repository files navigation

About this project

This is a collection of test about Spring and Spring Boot techniques.

base

  • Cache

events

Events are one of the more overlooked functionalities in the framework. Event publishing is one of the capabilities provided by ApplicationContext.

  • the event should extend ApplicationEvent
  • the publisher should inject an ApplicationEventPublisher
  • the listener should implement the ApplicationListener

create and publish events are synchronous by default.

The publisher constructs the event object and publishes it to anyone who's listening, multiple listener is fine.

Default, spring events are synchronous, publisher method blocks until all listeners finish processing the event. Just by creating an ApplicationEventMulticaster bean with an executor, you can turn that to Asynchronous.

annotation

About

A collection of spring learning materials

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published