Closed
Description
See spring-projects/spring-boot#17291 for background.
Currently using this pattern to define an ApplicationListener:
@Bean
public ApplicationListener<ClassPathChangedEvent> someListener() {
// ...
}
Will result in a lot of cast class exception because the listener is called for every event. It would be nice if we could consider the generic signature of the bean method and only call listeners that match it.