在集成nacos时,使用FeignClient请求接口时,报AbstractMethodError,首先反应这肯定是版本兼容的问题,但解决版本兼容也花了很久,试各种版本
错误如下:
Caused by: java.lang.AbstractMethodError: org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.choose(Ljava/lang/String;Lorg/springframework/cloud/client/loadbalancer/Request;)Lorg/springframework/cloud/client/ServiceInstance; at org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient.execute(FeignBlockingLoadBalancerClient.java:88) ~[spring-cloud-openfeign-core-3.0.3.jar:3.0.3] at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:119) ~[feign-core-10.12.jar:?] at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89) ~[feign-core-10.12.jar:?] at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100) ~[feign-core-10.12.jar:?] at com.sun.proxy.$Proxy138.create2(Unknown Source) ~[?:?] at com.mucang.demo.TestsController.create(TestsController.java:20) ~[classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_301] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_301] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_301] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.9.jar:5.3.9] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) [spring-webmvc-5.3.9.jar:5.3.9] ... 47 more
原因: 在引入nacos-discovery时自动会引入ribbion,(项目 fhadmin.cn)但引入的版本与springcloud引入的openfeign版本不匹配导致异常
<dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> </dependency>
解决:
更换版本至匹配 , 以下是我用的版本
spring-cloud-alibaba-dependencies 2021.1 spring-boot-starter-parent 2.4.9 spring-cloud-dependencies 2020.0.3
-----------------------------------www.fhadmin.cn-------------------------------自定义表单
28. 定义模版:拖拽左侧表单元素到右侧区域,编辑表单元素,保存表单模版
29. 表单模版:编辑维护表单模版,复制表单模版,修改模版类型,预览表单模版
30. 我的表单:选择表单模版,编辑表单规则,是否上传图片、附件、开启富文本、挂靠流程开关等
31. 表单数据:从我的表单进去可增删改查表单数据,修改表单规则
32. 挂靠记录:记录表单数据和流程实例ID关联记录,可删除