问题现象:

启动测试类(含通过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. 如何将整数转换为timespan

    可以使用From方法,这些方法可将Days / Days / minutes / seconds / milliseconds / ticks转换为TimeSpam格式,如下所示: TimeSpan ...

  2. Base64(2)

    import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UnsupportedEncoding ...

  3. matlab学习笔记10 一般运算符

    一起来学matlab-matlab学习笔记10 10_1一般运算符 觉得有用的话,欢迎一起讨论相互学习~Follow Me 参考书籍 <matlab 程序设计与综合应用>张德丰等著 感谢张 ...

  4. 【449】backup get weekly tweets

    import pandas as pd from datetime import datetime fn = r"D:\OneDrive - UNSW\tweets_flu.csv" ...

  5. IEnumerable是什么

    首先怎么认识一个对象 IE+number+able  IE数字 可能 从名字上看不出什么玩意,以至于很久都没人真正认识这个接口 先看官方的解释 IEnumerable Interface Expose ...

  6. Jenkins - 构建项目

    1 - 登录 进入起始界面 2 - 创建并运行第一个Jenkins项目 新建Item:创建新项目 --->Freestyle project:通用的项目创建方法 --->在新建项目页面(添 ...

  7. Kubernetes 服务质量 Qos 解析 - Pod 资源 requests 和 limits 如何配置?

    QoS是 Quality of Service 的缩写,即服务质量.为了实现资源被有效调度和分配的同时提高资源利用率,kubernetes针对不同服务质量的预期,通过 QoS(Quality of S ...

  8. Dotmemory 内存分析工具

    Dotmemory 内存分析工具 教程一.开始学习dotmemory 在本教程中,我们将学习如何运行dotMemory内存快照.此外,我们将简要地看看dotMemory的用户界面和基本分析的概念.考虑 ...

  9. Django文档阅读之执行原始SQL查询

    Django提供了两种执行原始SQL查询的方法:可以使用Manager.raw()来执行原始查询并返回模型实例,或者可以完全避免模型层直接执行自定义SQL. 每次编写原始SQL时都要关注防止SQL注入 ...

  10. AWD攻防赛之各类漏洞FIX方案

    笔者<Qftm>原文发布<FreeBuf>:https://www.freebuf.com/articles/web/208778.html