环境: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. MLCC Y5V 和 X7R 电容记录

    MLCC Y5V 和 X7R 电容记录 Y5V 的 MLCC 很少见的,但还是要注意. 自己记录一下,一个 100NF Y5V 电容 ,当温度到达 100度时,容值 为 36NF. 但是 X7R 电容 ...

  2. [转]Spring事务<tx:annotation-driven/>

    在使用SpringMVC的时候,配置文件中我们经常看到 annotation-driven 这样的注解,其含义就是支持注解,一般根据前缀 tx.mvc 等也能很直白的理解出来分别的作用.<tx: ...

  3. 【转】每天一个linux命令(26):用SecureCRT来上传和下载文件

    原文网址:http://www.cnblogs.com/peida/archive/2012/11/28/2793181.html 用SSH管理linux服务器时经常需要远程与本地之间交互文件.而直接 ...

  4. SPA页面缓存再优化二

    部署到线上的步骤: 拿到打包之后的文件,删除服务器上的文件,再放上去的. 测试1: 更改js文件,删除并上传新包. 额外发现1:如果用户在上传期间,仍然在系统之内,此时即使将服务器上的包删除掉,用户不 ...

  5. 使用 extract-text-webpack-plugin 报错:Error: Chunk.entry was removed. Use hasRuntime()

    问题:使用 extract-text-webpack-plugin 报错:Error: Chunk.entry was removed. Use hasRuntime() 解决:先运行npm unin ...

  6. 织梦ask标签的调用

    EDE 问答首页调用标签 标签名称: ask 功能说明:问答调用标签 适用范围:全局使用 基本语法: {dede:ask row='6' qtype='new' tid='0' titlelen='2 ...

  7. 启动ECLIPSE时,提示failed to create the java virtual machine

    修改eclipse.ini中的-XX:MaxPermSize=256M 这一项的原始值是512M.

  8. BASIC-30_蓝桥杯_阶乘计算

    题目: 问题描述 输入一个正整数n,输出n!的值. 其中n!=1*2*3*…*n. 算法描述 n!可能很大,而计算机能表示的整数范围有限,需要使用高精度计算的方法.使用一个数组A来表示一个大整数a,A ...

  9. bzoj 1414: [ZJOI2009]对称的正方形

    Description Orez很喜欢搜集一些神秘的数据,并经常把它们排成一个矩阵进行研究.最近,Orez又得到了一些数据,并已经把它们排成了一个n行m列的矩阵.通过观察,Orez发现这些数据蕴涵了一 ...

  10. spring boot学习(2) SpringBoot 项目属性配置

    第一节:项目内置属性 application.properties配置整个项目的,相当于以前的web.xml: 注意到上一节的访问HelloWorld时,项目路径也没有加:直接是http://loca ...