问题现象:

启动测试类(含通过Feign远程调用的组件),报错: No qualifying bean of type 'org.springframework.cloud.openfeign.FeignContext' available

问题解决:

在测试类上加上如下代码:

import org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration; @ImportAutoConfiguration({RibbonAutoConfiguration.class, FeignRibbonClientAutoConfiguration.class, FeignAutoConfiguration.class})

 

解决spring-test中Feign问题: No qualifying bean of type 'org.springframework.cloud.openfeign.FeignContext' available的更多相关文章

  1. spring异步执行报异常No qualifying bean of type 'org.springframework.core.task.TaskExecutor' available

    最近观察项目运行日志的时候突然发现了一个异常, [2018-04-03 10:49:07] 100.0.1.246 http-nio-8080-exec-9 DEBUG org.springframe ...

  2. Spring 定时器 No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined

    Spring 定时器 No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined stac ...

  3. Spring 定时器 No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined(转)

    最近项目里面,用了spring的定时任务,一直以来,项目运行的不错.定时器也能正常使用.可是,今天启动项目测试的时候,盯着启动Log看了一阵子,突然间发现,启动的Log中居然有一个异常,虽然一闪而过, ...

  4. spring cloud gateway网关启动报错:No qualifying bean of type 'org.springframework.web.reactive.DispatcherHandler'

    网关配置好后启动报错如下: org.springframework.context.ApplicationContextException: Unable to start web server; n ...

  5. NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.web.servlet.view.InternalResourceViewResolver' available

    问题描述: 项目中需要配置多个视图解析器,所以使用ContentNegotiatingViewResolver来处理,在其内部设置了FreeMarkerViewResolver .InternalRe ...

  6. SpringBoot- springboot集成Redis出现报错:No qualifying bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory'

    Springboot将accessToke写入Redisk 缓存,springboot集成Redis出现报错 No qualifying bean of type 'org.springframewo ...

  7. No qualifying bean of type 'org.springframework.scheduling.TaskScheduler' available

    2019-07-22 17:59:30,966 [DEBUG] [localhost-startStop-1] [ScheduledAnnotationBeanPostProcessor.java : ...

  8. Spring Task Scheduler - No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined

    1. Overview In this article, we are discussing the Springorg.springframework.beans.factory.NoSuchBea ...

  9. 解决:No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency

    错误: Description: Field jdbcTemplate in com.gwd.dao.impl.IUserDaoImpl required a bean of type 'org.sp ...

随机推荐

  1. Redis慢日志查询

    Redis slowlog 是个什么 redis的slow log记录了那些执行时间超过规定时长的请求.执行时间不包括I/O操作(比如与客户端进行网络通信等),只是命令的实际执行时间(期间线程会被阻塞 ...

  2. libmysqlclient.so.18 not found 的解决方法

    现象:在银河麒麟下,安装了mysql,并且mysql服务正常运行,但是Qt访问mysql还是报Driver not loaded,ldd Qt自己的mysql驱动报错如标题所示.路径: 解释:很明显就 ...

  3. (转载)Universal Correspondence Network

    转载自:Chris Choy's blog Universal Correspondence Network In this post, we will give a very high-level ...

  4. OpenShift上的OpenvSwitch入门

    前段时间参加openshift培训,通过产品部门的讲解,刷新了我对OpenShift一些的认识,今天先从最弱的环节网络做一些了解吧. Openvswitch是openshift sdn的核心组件,进入 ...

  5. [LeetCode] 349. Intersection of Two Arrays 两个数组相交

    Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1 ...

  6. POJ 2106 Boolean Expressions

    总时间限制: 1000ms  内存限制: 65536kB 描述 The objective of the program you are going to produce is to evaluate ...

  7. c++11 standardized memory model 内存模型

    C++11 标准中引入了内存模型,其目的是为了解决多线程中可见性和顺序(order).这是c++11最重要的新特征,标准忽略了平台的差异,从语义层面规定了6种内存模型来实现跨平台代码的兼容性.多线程代 ...

  8. Docker部署ELK 7.0.1集群之Elasticsearch安装介绍

    elk介绍这里不再赘述,本系列教程多以实战干货为主,关于elk工作原理介绍,详情查看官方文档. 一.环境规划 主机名 IP 角色 节点名 centos01 10.10.0.10 es node-10 ...

  9. 《PHP - 信号/基本操作/配置》

    一:PHP 信号 - SIGINT / SIGTERM / SIGQUIT - 退出FPM,在master收到退出信号后将向所有的worker进程发送退出信号,然后master退出. - SIGUSR ...

  10. 《算法 - 一致性 (hash) 算法》

    图片摘自: 每天进步一点点——五分钟理解一致性哈希算法(consistent hashing) 一:背景 - 一致性哈希算法在1997年由麻省理工学院的Karger等人在解决分布式Cache中提出的. ...