Inspired by spring-projects/spring-boot#41092, PersistenceExceptionTranslationInterceptor should defensively retrieve PersistenceExceptionTranslator beans, covering scenarios where the translator has not been initialized before shutdown but a late request starts using the persistence infrastructure during shutdown. It could simply rethrow the original exception as-is in case of a BeanCreationNotAllowedException from detectPersistenceExceptionTranslators.
Inspired by spring-projects/spring-boot#41092,
PersistenceExceptionTranslationInterceptorshould defensively retrievePersistenceExceptionTranslatorbeans, covering scenarios where the translator has not been initialized before shutdown but a late request starts using the persistence infrastructure during shutdown. It could simply rethrow the original exception as-is in case of aBeanCreationNotAllowedExceptionfromdetectPersistenceExceptionTranslators.