There was no check for existing EventPublisherRegistrar in registry, bug: https://github.com/spring-projects/spring-boot/issues/39282

Comment From: wilkinsona

Thanks very much, @Tish17. If you're interested, I added some tests in a separate commit on top of your changes.

Comment From: zsait-clearstreet

Thank you for the fix!