Code example for PersistenceAnnotationBeanPostProcessor

0
        return new MongoExceptionTranslator(); 
    } 
 
    @Bean 
    public PersistenceAnnotationBeanPostProcessor persistenceAnnotationBeanPostProcessor() { 
        return new PersistenceAnnotationBeanPostProcessor(); 
    } 
 
    @Bean 
    public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() { 
        return new PersistenceExceptionTranslationPostProcessor(); 
    } 
 
}