springboot在配置Bean的时候,可能会出现这样的错误!!! 原因是因为相同名字的bean已经存在了。

***************************
APPLICATION FAILED TO START
***************************Description:The bean 'interceprot', defined in class path resource [com/example/demo1/doInterceptor.class], could not be registered. A bean with that name has already been defined in file [/Users/sun/Desktop/demo1/target/classes/com/example/demo1/Interceprot.class] and overriding is disabled.Action:Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

要是想配置成功,需要在配置文件中加上这样一段

spring.main.allow-bean-definition-overriding=true

意思是覆盖bean。 这样就好了!!!!

The bean ‘xxx‘, defined in class path resource , could not be registered. A bean with that name has相关推荐

  1. The bean ‘beanNameViewResolver‘, defined in class path resource [cn/afterturn/easypoi/configuration/

    报错信息: Description: The bean 'beanNameViewResolver', defined in class path resource[cn/afterturn/easy ...

  2. 分页查询时报错:The bean ‘localeResolver‘, defined in class path resource [com/botany/spore/core/config/Comm

    问题描述: *************************** APPLICATION FAILED TO START ***************************Description ...

  3. springboot easypoi 报错The bean ‘beanNameViewResolver‘, defined in class path resource [cn/afterturn/e

    亲测好用!!!!!!!!!!!!!!! 事故现场: The bean 'beanNameViewResolver', defined in class path resource [cn/aftert ...

  4. springboot easypoi 报错The bean 'beanNameViewResolver', defined in class path resource [cn/afterturn/e

    今天在用springboot easypoi 做导出导入时,配置完成后启动项目报The bean 'beanNameViewResolver', defined in class path resou ...

  5. springcloud项目启动时报错 The bean ‘dataSource‘, defined in class path resource

    项目启动时报错,如下: Error starting ApplicationContext. To display the conditions report re-run your applicat ...

  6. The bean ‘api‘, defined in class path resource [com/common/swagger/SwaggerAutoConf

    The bean 'api', defined in class path resource [com/common/swagger/SwaggerAutoConf 1.解决办法-1 将重复的bean ...

  7. 解决Error creating bean with name xxx defined in class path resource [applicationContext.xml]错误

    今天使用基于MapperFactoryBean来实现MyBatis与Spring的整合,使用Mapper接口编程,一直报一个错误,调试了很久 org.springframework.beans.fac ...

  8. A bean with that name has already been defined in class path resource [.] and overriding is disabled

    A bean with that name has already been defined in class path resource [org/springframework/cloud/com ...

  9. 解决Spring 异常:defined in BeanDefinition defined in class path resource [XXX], could not be registered.

    背景 因为项目越来越臃肿,需要对项目进行拆包处理. 问题 在拆完包后,发现报了个"defined in BeanDefinition defined in class path resour ...

最新文章

  1. 安装部署中的数据库打包和快捷方式启动浏览器
  2. 电脑html按键侧滑广告,HTML5侧滑聊天面板
  3. js中const,var,let的区别
  4. webpack ,gulp
  5. 备份MySQL数据库的方法
  6. perl(Class::MethodMaker) is needed by MySQL-ndb-tools-5.1.21-0.glibc23.i386
  7. git 生成多个patch_如何用git命令生成Patch和打Patch
  8. .NET开发Silverlight程序:界面和对象模型
  9. 解读最具O2O属性—哈根达斯微信企业号的成功之道
  10. php中html写法,细致说明注解三种PHP嵌套HTML的写法_后端开发
  11. 拓端tecdat|电商平台数据解锁网红零食销量密码
  12. linux shell实现守护进程 看门狗 脚本
  13. java 泛型方法 类型_Java泛型方法
  14. a卡是什么?a卡和n卡的区别
  15. docker中报错Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirro
  16. 全面理解Web3.0时代
  17. CAD输出为PDF至A4大小
  18. Linux 下的分屏利器-tmux安装、原理及使用
  19. java中双冒号的用法
  20. 最长子序列DP和二分法

热门文章

  1. 八月活动强攻指南!七夕玩转H5活动
  2. 记录下第一次发表CSDN(打印乘法口诀表)
  3. DPDK中文-DPDK工具(pdump)
  4. 道路千万条,为什么这家创新存储公司会选这条?
  5. 火狐浏览器网络连接慢
  6. 计算机毕业设计Java车辆违规信息管理系统(源码+系统+mysql数据库+lw文档)
  7. MATLAB循环运算
  8. 浅谈怎样建设一个为企业带来更大价值的企业网站
  9. source profile之后关闭终端,在打开终端nvcc -V和java -verson没有输出
  10. 由于手机中的时间不对,导致的https网络连接失败