赞
踩
feign.codec.DecodeException: 内部错误,请稍后再试
at feign.InvocationContext.proceed(InvocationContext.java:40)
at feign.AsyncResponseHandler.decode(AsyncResponseHandler.java:116)
at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:89)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:141)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:91)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
Failed to convert value of type ‘java.lang.String’ to required type
org.springframework.web.method.annotation.MethodArgumentConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.*.Xxx'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.*.Xxx': no matching editors or conversion strategy found
at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:129)
at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:122)
at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:179)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:146)
注1:目标类型 ‘com.*.Xxx’ 做了脱敏处理
@Configuration
public class StringToObjectConfiguration implements WebMvcConfigurer {
@Override
public void addFormatters(FormatterRegistry registry) {
registry.addConverter(new JSONStringToObjectParamConverter());
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。