开发者社区> 问答> 正文

Consider renaming one of the beans or en?400报错

写微服务的项目,出现以下报错

Description:

The bean 'exmafilm.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null 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

 

 

 

 

展开
收起
爱吃鱼的程序员 2020-06-05 14:44:59 864 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>springcloud在idea中默认远程调用时 --只能远程调用另一个服务的--  一个控制层里的函数;</p> 
    

    而我想调用这个服务里的另一个控制层里的函数是不被允许的;

    报错如下:

     

    解决方案:

    上面已近说了一种解决方案(重命名),第二种方案如下图:

    2020-06-05 14:45:17
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载