跳至主要内容

博文

目前显示的是标签为“spring cloud”的博文

[S] spring cloud study - 20180315 - good website

had not read 1. https://github.com/spring-cloud/spring-cloud-netflix/issues/207 2. https://insight.io/github.com/Netflix/Hystrix/blob/v1.5.5/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/aop/aspectj/HystrixCommandAspect.java 3. https://gitter.im/spring-projects/spring-boot 4. https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 5. https://springcloud.cc/spring-cloud-dalston.html

[Q] spring cloud 用到 hystrix 时报找不到类的错误

 报错如下: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang3/Validate] with root cause  java.lang.NoClassDefFoundError: org/apache/commons/lang3/Validate  at com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect.methodsAnnotatedWithHystrixCommand(HystrixCommandAspect.java:78) ~[hystrix-javanica-1.5.3.jar:1.5.3] 找到maven目录看,有下面这个jar,解压看,有Validate类, commons-lang3/3.3.1.jar 奇怪了,又用反编译看看 jd-gui-1.4.0.jar 看到反编译不出来。于是重新下载过,之后可以了。 怀疑是maven下载过程中出错吧。