SpringBoot经典报错Error creating bean with name ‘transactionManager‘ defined in class path resource

完整报错:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource 
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: 
BeanPostProcessor before instantiation of bean failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': 
 Initialization of bean failed; nested exception is 
 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 
 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' 
 available
  • 近段时间,总是遇到各种各样奇奇怪怪的问题,报错也提示不出个什么思路来,这不,又遇到一个蛋疼的报错,如上。
  • 调试才知道,这个问题的报错行在保存数据的时候引起的,报错的地方就是排查的方向,然后费了很长时间才发现原来是实体类和表名没有对应好的缘故。
  • 心中有一万只草拟吗在奔腾
  • 很多时候,报错都是因为一些小的问题引起的,但是总是找不到,究其原因到底是为什么呢?我想,这是因为没有标准操作流程,所以在做一些改动的时候会忽略一些很小的错误,然后一直在那里纠缠,特别耗时间,为了一个bug浪费大块的时间实在不值得,大家以后要小心这类错误了,也不要着急,慢慢查找一定能找到原因。

版权声明:本文为weixin_39076203原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。