使用@FeignClient时,报java.lang.NoClassDefFoundError: feignFeign$Builder错

错误信息:

Caused by: java.lang.ClassNotFoundException: feign.Feign$Builder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_60]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_60]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_60]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_60]
... 39 common frames omitted

错误分析:

缺少了对应feign的jar包

解决办法:

在对应工程的pom文件中导入jar包

dependency
groupIdorg.springframework.cloud/groupId
artifactIdspring-cloud-starter-feign/artifactId
/dependency

转载于:https://www.cnblogs.com/ellacan/p/8822374.html

最新回复(0)
/jishuNMYHFAfa_2BfMX2l20vAWBuoJRDrOzRI0znL4zYA_3D_3D4489255
8