The listener could be invoked concurrently by multiple thread, we should make them threadsafe.
SimpleApplicationEventMulticaster doc:
By default, all listeners are invoked in the calling thread.
Comment From: dugenkui03
@wilkinsona Thanks for your review. Code in HibernateJpaAutoConfigurationTests have been reverted , please help review again.
Comment From: wilkinsona
Thanks very much, @dugenkui03. I separated out into a separate issue (#30844) the changes to ClassPathFileSystemWatcherTests as, unlike the problem with JobExecutionExitCodeGenereator, the problem with the tests won't affect users.