环境:spring  boot:  1.3.7  spring  cloud : Brixton.SR5

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.7.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

添加

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

添加注解 @SpringCloudApplication

添加  @HystrixCommand(fallbackMethod = "helloFallBack")

后,启动tomcat时报以下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hystrixCommandAspect' defined in class path resource [org/springframework/cloud/netflix/hystrix/HystrixCircuitBreakerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect]: Factory method 'hystrixCommandAspect' threw exception; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint

看来是jar包有问题了

最后试了n个依赖,最后只添加了下面这个依赖就好了

<dependency>
<groupId> org.aspectj</groupId>
<artifactId> aspectjweaver</artifactId>
<version> 1.6.11</version>
</dependency>

Spring Cloud Hystrix java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint 问题的更多相关文章

  1. 【异常】Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around

    原因:缺少aspect,AOP的maven坐标 导入maven坐标: <dependency> <groupId>org.springframework</groupId ...

  2. Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.annotation.Around

    1.错误描述 INFO:2015-05-01 11:12:15[localhost-startStop-1] - Root WebApplicationContext: initialization ...

  3. spring问题:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive

    问题描述: spring的:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive 解决方案: 缺少jar ...

  4. Spring系列: 使用aop报错:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle

    写了个最简单的aop例子 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...

  5. java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive

    问题:使用Spring时,报错:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive问题原因: 少了as ...

  6. could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

    © 版权声明:本文为博主原创文章,转载请注明出处 1.问题描述 搭建SSH框架启动报错如下: 六月 07, 2017 2:34:34 下午 org.springframework.web.contex ...

  7. 笔记:Spring Cloud Hystrix 服务容错保护

    由于每个单元都在不同的进程中运行,依赖通过远程调用的方式执行,这样就有可能因为网络原因或是依赖服务自身问题出现调用故障或延迟,而这些问题会直接导致调用方的对外服务也出现延迟,若此时调用方的请求不断增加 ...

  8. 第五章 服务容错保护:Spring Cloud Hystrix

    在微服务架构中,我们将系统拆分为很多个服务,各个服务之间通过注册与订阅的方式相互依赖,由于各个服务都是在各自的进程中运行,就有可能由于网络原因或者服务自身的问题导致调用故障或延迟,随着服务的积压,可能 ...

  9. SpringMVC集成AOP错误:java lang classnotfoundexception org aspectj lang joinpoint

    记录自己出现的问题,Spring AOP 使用测试类测试没问题,在SpringMVC启动服务器时出现java lang classnotfoundexception org aspectj lang ...

随机推荐

  1. 【转】每天一个linux命令(60):scp命令

    原文网址:http://www.cnblogs.com/peida/archive/2013/03/15/2960802.html scp是secure copy的简写,用于在Linux下进行远程拷贝 ...

  2. SQL语言:DDL/DML/DQL/DCL

    SQL (Structure Query Language)语言是数据库的核心语言. SQL 的发展是从1974年开始的,其发展过程如下: 1974年-----由Boyce和Chamberlin提出, ...

  3. jsp 中变量作用域:pageScope、requestScope、sessionScope、applicationScope

    jsp 中,变量的作用域,一共有4种: pageScope:表示变量只能在本页面使用. requestScope:表示变量能在本次请求中使用. sessionScope:表示变量能在本次会话中使用. ...

  4. js 坐标兼容性

    不同浏览器对坐标属性的支持:

  5. redis和memcached选择,对比分析

    memcache和redis是互联网分层架构中,最常用的KV缓存.不少同学在选型的时候会纠结,到底是选择memcache还是redis? memcache提供的功能是redis提供的功能的子集,不用想 ...

  6. python使用smtplib发送邮件

    python要实现发送邮件的功能,需要使用smtplib库. 1. 过程大致如下: 1. 建立和SMTP邮件服务器的连接 # 默认端口25 smtp = smtplib.SMTP(host, port ...

  7. 2018-2019 Exp2 后门原理与实践

    2018-2019 Exp2 后门原理与实践 目录 一.实验内容说明及基础问题回答 二.工具准备 查看WindowsIP和LinuxIP Windows获得Linuxshell Linux 获得Win ...

  8. [UE4]FString常用API

    转自:http://aigo.iteye.com/blog/2279808 将int或float转换为string: 将FString转换为char*: 将string转换为int或者float: 字 ...

  9. 组件Slate教程 & UMG widget构造初始化函数中获取其内部组件

    转自:http://aigo.iteye.com/blog/2296218 目的:在自定义的Widget初始化完毕后,获取其内部的button.combo等UMG组件的C++指针. 这里我们新建了一个 ...

  10. Eclipse中安装及配置EGit插件

    转载:https://jingyan.baidu.com/article/59703552dcc5ad8fc107407e.html