1. 问题

org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class com.xianzhi.jinba.vo.NewNewsFlash$Explain and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["body"]->java.util.ArrayList[]->java.util.HashMap["explain"]->java.util.ArrayList[]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class com.xianzhi.jinba.vo.NewNewsFlash$Explain and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.HashMap["body"]->java.util.ArrayList[]->java.util.HashMap["explain"]->java.util.ArrayList[])
 

2. 解决方案

原因,bean中属性为private,改为public

Could not write content: No serializer found for class and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) )的更多相关文章

  1. 【实体 报错 】No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer

    HTTP Status 500 - Could not write content: No serializer found for class org.hibernate.proxy.pojo.ja ...

  2. No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer

    异常信息如下所示: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for cla ...

  3. Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.catalina.connector.CoyoteWriter and no properties discovered to create BeanSerializer

    一.什么是序列化In computer science, in the context of data storage, serialization is the process of transla ...

  4. No serializer found for class com.bean.user and no properties discovered to create BeanSerializer

    解决方法: 方法1:将bean目录下的实体类属性由private改为public(不推荐): 方法2:给实体类属性设置setter和getter方法(推荐使用).

  5. 在访问RESTful接口时出现:Could not write content: No serializer found for class的问题解决小技巧收集

    注意:市面上对于写RESTful是用RestFul,其实是不规范的,标准写法RESTful. 在Java上,处理这个应该是没有继承Serializable类,然后通过Eclipse生成serialVe ...

  6. 【hibernate 报错】No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer 【get和load的区别】

    报错: HTTP Status 500 - Could not write content: No serializer found for class org.hibernate.proxy.poj ...

  7. HttpMessageNotWritableException: Could not write JSON: No serializer found for class ****

    今天碰到一个异常,下面是错误信息 org.springframework.http.converter.HttpMessageNotWritableException: Could not write ...

  8. 异常处理:No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer

    No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no pro ...

  9. Spring MVC 解决 Could not write JSON: No serializer found for class java.lang.Object

    Spring MVC 解决 Could not write JSON: No serializer found for class java.lang.Object 资料参考:http://stack ...

随机推荐

  1. Ubuntu16.04编译安装tensorflow,2018最新血泪踩坑之后的全面总结!绝对成功!【转】

    本文转载自:https://blog.csdn.net/pzh11001/article/details/79683133 大家好,我是 (深度学习硬件DIY总群)(719577294)群主:    ...

  2. github上fork别人的代码之后,如何保持和原作者同步的更新

    1.从自己fork之后的版本库clone $  git clone -o chucklu https://github.com/chucklu/Hearthstone-Deck-Tracker.git ...

  3. Maximum Depth of Binary Tree,求树的最大深度

    算法分析:求树的最小最大深度时候,都有两种方法,第一种是递归思想.树最大最小深度,即为它的子树的最大最小深度+1,是动态规划的思想.还有一种方法是层序遍历树,只不过求最小深度时,找到第一个叶子节点就可 ...

  4. codevs 2216 行星序列 线段树+延迟标记(BZOJ 1798)

    2216 行星序列  时间限制: 2 s  空间限制: 256000 KB     题目描述 Description “神州“载人飞船的发射成功让小可可非常激动,他立志长大后要成为一名宇航员假期一始, ...

  5. ng-grid

    请查看官网:http://angular-ui.github.io/ui-grid/ 简单的使用: 总的来说我们 1.需要引入ng-grid-1.3.2.js 2.在html页面需要加入  class ...

  6. 客户端链接Blog

    Word 2013链接Blog 1.设置共享->发布至博客->发布至博客 2.新建博客账户 3.添加新建账户信息 注意:URL内为Blog名,而非用户名 a) 在"Type of ...

  7. vue: alias

    resolve: { extensions: ['.js', '.vue', '.json'], alias: { '@': path.resolve('src') } }

  8. 201621123006 《Java程序设计》第11周学习总结

    1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多线程相关内容. 2. 书面作业 本次PTA作业题集多线程 1. 源代码阅读:多线程程序BounceThread 1.1 BallR ...

  9. L205 EE

    As an Electrical Engineer at P, you will: Design, build, and verify PCBAsCreate, modify, and update ...

  10. node 应用集合

    node+react上传 淘宝的formidable express部署