org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistenceExceptionTranslationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfiguration.class]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: No persistence exception translators found in bean factory. Cannot perform exception translation.
这个是在我写练习Demo时遇到的错误,经过反复的琢磨之后,才发现,是在引入Dubbo时,Dubbo引入的spring包与SpringBoot引入的Spring包发生了冲突,修改pom文件,
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.5.3</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
</dependency>
修改了Dubbo的spring包,这样就能解决问题了。
还有问题,你可以发邮件给我,vgbhfive@foxmail.com