The bean ‘xxx‘, defined in class path resource , could not be registered. A bean with that name has
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相关推荐
- The bean ‘beanNameViewResolver‘, defined in class path resource [cn/afterturn/easypoi/configuration/
报错信息: Description: The bean 'beanNameViewResolver', defined in class path resource[cn/afterturn/easy ...
- 分页查询时报错:The bean ‘localeResolver‘, defined in class path resource [com/botany/spore/core/config/Comm
问题描述: *************************** APPLICATION FAILED TO START ***************************Description ...
- springboot easypoi 报错The bean ‘beanNameViewResolver‘, defined in class path resource [cn/afterturn/e
亲测好用!!!!!!!!!!!!!!! 事故现场: The bean 'beanNameViewResolver', defined in class path resource [cn/aftert ...
- springboot easypoi 报错The bean 'beanNameViewResolver', defined in class path resource [cn/afterturn/e
今天在用springboot easypoi 做导出导入时,配置完成后启动项目报The bean 'beanNameViewResolver', defined in class path resou ...
- springcloud项目启动时报错 The bean ‘dataSource‘, defined in class path resource
项目启动时报错,如下: Error starting ApplicationContext. To display the conditions report re-run your applicat ...
- 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 ...
- 解决Error creating bean with name xxx defined in class path resource [applicationContext.xml]错误
今天使用基于MapperFactoryBean来实现MyBatis与Spring的整合,使用Mapper接口编程,一直报一个错误,调试了很久 org.springframework.beans.fac ...
- 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 ...
- 解决Spring 异常:defined in BeanDefinition defined in class path resource [XXX], could not be registered.
背景 因为项目越来越臃肿,需要对项目进行拆包处理. 问题 在拆完包后,发现报了个"defined in BeanDefinition defined in class path resour ...
最新文章
- 安装部署中的数据库打包和快捷方式启动浏览器
- 电脑html按键侧滑广告,HTML5侧滑聊天面板
- js中const,var,let的区别
- webpack ,gulp
- 备份MySQL数据库的方法
- perl(Class::MethodMaker) is needed by MySQL-ndb-tools-5.1.21-0.glibc23.i386
- git 生成多个patch_如何用git命令生成Patch和打Patch
- .NET开发Silverlight程序:界面和对象模型
- 解读最具O2O属性—哈根达斯微信企业号的成功之道
- php中html写法,细致说明注解三种PHP嵌套HTML的写法_后端开发
- 拓端tecdat|电商平台数据解锁网红零食销量密码
- linux shell实现守护进程 看门狗 脚本
- java 泛型方法 类型_Java泛型方法
- a卡是什么?a卡和n卡的区别
- docker中报错Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirro
- 全面理解Web3.0时代
- CAD输出为PDF至A4大小
- Linux 下的分屏利器-tmux安装、原理及使用
- java中双冒号的用法
- 最长子序列DP和二分法