前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。

1. 场景,springcloud 学习工程中,把 feign 和 ribbon 工程 作为应用服务,纳入 hystrix-turbine 服务监控中。

2. feign 工程启动报错如下:

ClassNotFoundException:
com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect

3. 解决:

在 pom.xml 中加上依赖:

        <dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-hystrix</artifactId></dependency>

此时, feign  完整依赖为:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.feign</groupId><artifactId>service-feign</artifactId><version>0.0.1-SNAPSHOT</version><packaging>jar</packaging><name>service-feign</name><description>服务消费 feign 方式</description><parent><groupId>com.base</groupId><artifactId>base-config</artifactId><version>0.0.1-SNAPSHOT</version></parent><dependencies><!-- 开启 hystrix 监控 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-hystrix</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-openfeign</artifactId></dependency></dependencies><repositories><repository><id>spring-milestones</id><name>Spring Milestones</name><url>https://repo.spring.io/milestone</url><snapshots><enabled>false</enabled></snapshots></repository></repositories></project>

4. 启动工程成功。

-------------------------------------------------------------------

PS: springcloud 系列文章见:一看就懂的springCloud系列

解决:ClassNotFoundException: com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect相关推荐

  1. 在Spring中使用Netflix Hystrix批注

    除了在主页上引述之外,我想不出更好的方式来描述Netflix Hystrix库的特定功能: 延迟和容错方式: 停止级联故障. 后备和正常降级. 无法快速快速恢复. 使用断路器隔离线程和信号量. 我看到 ...

  2. SpringCloud Netflix Hystrix

    文章目录 一. Hystrix简介 1 什么是灾难性雪崩效应 2 什么是Hystrix 二. 服务降级(Ribbon中) 三. 服务熔断(Ribbon中)(服务降级的强化版) 四. 请求缓存(Ribb ...

  3. Spring Cloud Netflix Hystrix介绍和使用

    前面我们搭建了具有服务降级功能的Hystrix客户端,现在我们来详细了解下Hystrix的一些功能. Hystrix的意思是豪猪,大家都知道,就是长满刺的猪...实际上,它表明了该框架的主要功能:自我 ...

  4. Spring cloud报错com.netflix.hystrix.exception.HystrixRuntimeException

    现象 生产环境,接口调用失败 feign客户端接口访问超时 查看服务正常,没有报错日志 仔细看了下,没有日志,应该是请求没有到达feign服务提供者 部分日志如下: com.netflix.hystr ...

  5. Netflix Hystrix断路器简介与工作原理

    一.前言? 1.Netflix Hystrix断路器是什么? Netflix Hystrix是SOA/微服务架构中提供服务隔离.熔断.降级机制的工具/框架.Netflix Hystrix是断路器的一种 ...

  6. com.netflix.hystrix.exception.HystrixRuntimeException

    com.netflix.hystrix.exception.HystrixRuntimeException 关于Hystrix因超时导致的熔断,主要检查hystrix和ribbon两项配置 hystr ...

  7. com.netflix.hystrix.exception.HystrixRuntimeException总结

    com.netflix.hystrix.exception.HystrixRuntimeException: PolicyFeignClient#getAgentFriend(List) failed ...

  8. 关于 Spring AOP (AspectJ) 你该知晓的一切

    [版权申明]未经博主同意,谢绝转载!(请尊重原创,博主保留追究权) http://blog.csdn.net/javazejian/article/details/54629058 出自[zejian ...

  9. Spring AOP + AspectJ Annotation Example---reference

    In this tutorial, we show you how to integrate AspectJ annotation with Spring AOP framework. In simp ...

最新文章

  1. Android 使用CornerPathEffect绘制圆角矩形
  2. 秒杀苹果carplay baidu车联网API冷艳北京车展
  3. 为什么不使用volatile,其它线程也能得到当前线程修改后的值,不使用volatile也不存在可见性问题?原来解决可见性问题不一定需要volatile,println也可以
  4. VTK:图片之ImageRotate
  5. AUTOSAR从入门到精通100讲(二十)-特斯拉、高通、华为AI处理器深度分析
  6. python图灵测试_最前沿:基于GAN和RL的思想来训练对话生成,通过图灵测试可期!...
  7. php如何处理查询请求,PHP如何处理Web请求流程
  8. C/C++排序算法(3)冒泡排序
  9. UML类图几种关系的总结,泛化 = 实现 组合 聚合 关联 依赖
  10. linux文件管理命令详解
  11. 以后所有经济时事的点评都不在这里
  12. XP 上金山词霸 占CPU 特别大的问题
  13. Unix网络编程第一卷学习总结
  14. 红巨星粒子插件Trapcode Suite 14.0 Win版全套中文完美汉化版
  15. swift 指定区域截图,自定义不规则图形截图
  16. html怎样把两张图片重叠6,两张照片重叠成一张-如何将两张相片重叠放在一起?...
  17. KWS_关键词命名+识别率和误识别率
  18. 分布式基础--CAP原理
  19. 避免我们的邮件服务器发出的邮件被当成垃圾邮件
  20. mysql 数据文件_mysql的数据文件

热门文章

  1. 【转】JPA、Hibernate和Mybatis区别和总结
  2. Hexo 博客自定义一个不使用主题模板渲染的独立页面
  3. REVERSE-PRACTICE-BUUCTF-5
  4. 网页传世服务器端,传世服务端文件分析
  5. 【牛客 - 210A】游戏(思维,脑洞)
  6. 视觉SLAM十四讲(2):初识SLAM
  7. 计算机网络技术实验,计算机网络技术实验
  8. php批量下载网络图片,php批量下载网页图片并替换路径为本地
  9. mysql外键关联查询_MySQL外键约束和多表联查
  10. java中select的用法_mybaties中select用法,以及常用增删改查