Failed to load resource: the server responded with a status of 500 (Internal Server Error)
程序员文章站
2022-07-10 22:05:45
【原因】 因为这个表和另一个表是有一对多关系的,当序列化表1的时候,会找到和另一个表2关联的字段,就会到另一个表2中序列化,然后另一个表2中也有一个字段和表1相关联.这样.序列化就会发生这种错误! 【解决方案】 /注:这里值得注意的是,当有外键向关联时,必须要指定序列化元素,如果没有外键相关联,直接 ......
【原因】
因为这个表和另一个表是有一对多关系的,当序列化表1的时候,会找到和另一个表2关联的字段,就会到另一个表2中序列化,然后另一个表2中也有一个字段和表1相关联.这样.序列化就会发生这种错误!
【解决方案】
/注:这里值得注意的是,当有外键向关联时,必须要指定序列化元素,如果没有外键相关联,直接序列化该实体对象
return json(new { ti.typename,ti.typevalue,ti.userid,ti.remark,ti.fullpath,ti.tyid,ti.isdisplay}, jsonrequestbehavior.allowget);
下一篇: js中实现隐藏部分姓名或者电话号码
推荐阅读
-
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
-
thymeleaf There was an unexpected error (type=Internal Server Error, status=500).
-
There was an unexpected error (type=Internal Server Error, status=500). Circular view path [/login]:
-
Spring boot 出现 There was an unexpected error (type=Internal Server Error, status=500)
-
出现There was an unexpected error (type=Internal Server Error, status=500).
-
解决There was an unexpected error (type=Internal Server Error, status=500)问题(使用Thymeleaf报错)
-
There was an unexpected error (type=Internal Server Error, status=500). getWriter() has already been
-
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error
-
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error
-
Failed to load resource: the server responded with a status of 500 (Internal Server Error)