feign.RequestTemplate.charset()Ljava/nio/charset/Charset
java.lang.NoSuchMethodError: feign.RequestTemplate.charset()Ljava/nio/charset/Charset;
at com.taoche.logging.LoggerHelper.feignLog(LoggerHelper.java:132)
at com.taoche.logging.client.LoggingFeign.apply(LoggingFeign.java:36)
at feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:169)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:99)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:78)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at com.sun.proxy.$Proxy94.getSn(Unknown Source)
at com.taoche.order.component.SNComponent.getRefundNo(SNComponent.java:28)
at com.taoche.order.SNTest.test(SNTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
问题
不同版本的RequestTemplate方法不同,如10.1.0版本的feign-core下无charset()方法,而feign-core:9.5.0版本中存在方法Charset charset()
解决方案
统一版本为10.1.0