The bean ‘placeholderConfigurer‘, defined in net.biancheng.c.MicroServiceCloudProviderDept8001Applic

一、项目背景

在联系SpringCloud 是为了方便复制module,生成多个module时报错

二、报错展示

2022-11-16 09:03:09.949  INFO 44700 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-11-16 09:03:09.952 ERROR 44700 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

The bean 'placeholderConfigurer', defined in net.biancheng.c.MicroServiceCloudProviderDept8001Application, could not be registered. A bean with that name has already been defined in class path resource [net/biancheng/c/MicroServiceCloudProviderDept8002Application.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true


Process finished with exit code 0

三、原因分析

复制的项目或者复制module时,有些module相应的配置没有及时刷新,导致编译路径指向,造成不同的module或者project拥有同一个编译路径,出现重复,如果要是仔细查看报错文字,也应该能猜出一二:
net.biancheng.c.MicroServiceCloudProviderDept8001Application, could not be registered. A bean with that name has already been defined in class path resource [net/biancheng/c/MicroServiceCloudProviderDept8002Application.class] and overriding is disabled.

四、纠错方案

把项目输出地址更改成项目对应的地址:(图一变成图二)
图一如下:
在这里插入图片描述
图二如下:
在这里插入图片描述
运行成功。

五、后话

文中所写不符合逻辑或者不严谨之处,恳望007们海涵;本着知其然,知其所以然的态度,诚请007们留言指正,以免误导他人,若仍未解决大家的问题,望去他处拜询,并翘盼回来留言补充

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值