springboot应用A通过httpclient获得另一个springboot的httpresponse时报错:
WARN ExceptionHandlerExceptionResolver:140 - Resolved [org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class org.apache.http.conn.EofSensorInputStream]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.http.conn.EofSensorInputStream and no properties discovered to create BeanSerializer
(to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)(through reference chain: org.apache.http.impl.execchain.HttpResponseProxy["entity"]->org.apache.http.impl.execchain.ResponseEntityProxy["content"])]
解决方案:
jackson:
serialization:
FAIL_ON_EMPTY_BEANS: false
yaml中增加配置
参考:
https://www.cnblogs.com/charlypage/p/9574452.html
————————————————
版权声明:本文为CSDN博主「sdjkjsdh」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/sdjkjsdh/article/details/88410564