spring-data-mongodb
spring-data-mongodb copied to clipboard
Retrofit events for generics matching of ApplicationEvent subtypes with generic payload parameter
See https://github.com/spring-projects/spring-framework/issues/17661
A side effect here is that listeners accepting Object (e.g. ApplicationListener<AfterSaveEvent<Object>>) no longer match any subtype because of the refined type matching. Instead, these listeners need to be defined as ApplicationListener<AfterSaveEvent<? extends Object>> which is actually the correct version according to generics.