HomepageUserServiceTest无法通过测试

来源:-

sofia_ss

2020-07-08 20:59

Caused by: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'eureka-client-homepage-course.FeignClientSpecification' defined in null: Cannot register bean definition [Generic bean: class [org.springframework.cloud.openfeign.FeignClientSpecification]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] for bean 'eureka-client-homepage-course.FeignClientSpecification': There is already [Generic bean: class [org.springframework.cloud.openfeign.FeignClientSpecification]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] bound.


已经删除掉了yml中的

feign:
#  hystrix:
#    enabled: true


写回答 关注

1回答

  • sofia_ss
    2020-07-08 21:17:40
    spring:
      main:
        allow-bean-definition-overriding: true

    完美解决

4小时使用SpringCloud框架实现慕课网主页后端开发

使用 SpringCloud 实现微服务架构,完成慕课网主页后端开发。

3831 学习 · 53 问题

查看课程

相似问题