SpringBoot启动报错" Unable to start embedded container; nested exception is org.springframework.beans.fa

SpringBoot启动报如下异常:

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-09-15 14:08:02.979 [restartedMain] ERROR org.springframework.boot.SpringApplication - Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is 
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat': Initialization 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.BeanCreationException: 
Error creating bean with name 'org.springframework.cache.config.internalCacheAdvisor' defined in class path resource [org/springframework/cache/annotation/ProxyCachingConfiguration.class]: 
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate 

关键词:

  • Unable to start embedded container;
  • Error creating bean with name
  • org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat’:
    Cache
    解决:
    所以猜测是注解配置的错误,报Bean工厂错误,后面找博客和相关其他排查了一下.发现是我注解@EnableCaching 在没有用到缓存技术就放到application启动类中了.@EnableCacheing要和@Cacheable(“books”)一起使用,否则就删了它,否则就会报这个错误

所以但凡是报该异常的,先排除一下是不是注解字段放错位置和拼写错误

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值