错误Error: Request failed with status code 500 ,调试前端没问题,后端也没问题,还报错“连接超时” 在Network中找到错误Self referencing loop detected for property 'xxxx' with type

当我们后端调试一步一步调试也没发现错误在哪里,但是跳转到前端就报错了。前端没有接收到后端传过来的数据,总结了一下:

**前端接收问题**
前端就是接收**字段名**以及**类型**问题 比如:nAmE,names,name:0,name:[]等等名字和类型问题

 data() {
return {
filter: {
name: null,
}}}, this.axios.get("/api/xxx/xxx").then((res) => {
可以加一个弹窗看看有没有跳进来,跳进来了就是前端问题
alert();
this.name=res;
});

**后端问题**

当我们在数据库里面添加对应表的**外键** 并调用 *程序中经常会用到来回调用,或者调用当前的下一级等等场景*

   public class User
{
public int id { get; set; }
public int LoginId { get; set; }
public Login Logins{ get; set; }
} public class User
{
public int id { get; set; }
public int UserId { get; set;}
public User Users{ get; set; }
}

在后端处理完后,往前端返回数据的时候

public xxx
{
var result= user.quer();
return ok(result)
}

这个时候注意一个问题不然就会上述错误

//当我们引用   user的时候
//类里面
user ——> id=1
LoginId=1
Login =system.Login //这是一般的时候不会有错误,因为LoginId没有对应的user表

就怕这个时候你引用类里面又反过来调用我们的类,形成的逻辑循环

           user   ——> id=1
LoginId=1
Login =system.Login ——>id=1
UserId=1
User=system.User ——> id=1
Login=1
Login=system.Login ——> id=1
UserId=1
User=system.User ——>.........
//.................以此类推一直循环,但这本身没有错误不会报错..........................

总结:当我们的 user类外键链接了Login类,而Login类也链接了User类,这个时候输出User类的时候恰好有个LoginId值,使得Login也调用了User,那就会形成自引用循环,就会报错

希望上述能帮到你

Request failed with status code 500以及自引用循环Self referencing loop detected for property ‘xx‘ with type的更多相关文章

  1. Uncaught (in promise) Error: Request failed with status code 500解决方案

    今天又学到一种修改bug的方法  : let newpwd = crypto.createHash('md5').update(req.body.upwd).digest('hex'); 在点击按钮加 ...

  2. axios请求报Uncaught (in promise) Error: Request failed with status code 404

    使用axios处理请求时,出现的问题解决 当url是远程接口链接时,会报404的错误: Uncaught (in promise) Error: Request failed with status ...

  3. Android通过soap2访问webservice遇到HTTP request failed, HTTP status: 302的问题

    笔者用C#在服务器端写了一个Webservice,然后再Android客户端通过soap2调用webservice的函数,遇到了HTTP request failed, HTTP status: 30 ...

  4. 源映射错误:request failed with status 404

    源映射错误:request failed with status 404:源映射错误:request failed with status 404

  5. Qt error ------ 出现Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly

    出现原因: 使用了不存在的对象 数组越界了 用 delete 释放未分配的内存空间,或者超过一次释放同个内存 比如: 顺序不能颠倒 正确: ui->setupUi(this); ui->t ...

  6. RtlWerpReportException failed with status code :-1073741823

    在release下程序运行总是崩溃:debugView输出了这个崩溃信息, 1. 一开始是release看崩溃,各种二分法找崩溃点,太玄没找到: 2. 终于想到可以调试,我草,调试一下瞬间发现某个cl ...

  7. 浏览器提示:源映射错误:request failed with status 404 源 URL:http://xxx.js 源映射 URL:jquery.min.map

    浏览器 jquery1.9.1min.js 报脚本错误 无jquery.min.map 文件 最近在浏览个人网站的时候就遇到了这个问题 我先说一下什么是source map文件. source map ...

  8. 重定向Http status code 303 和 302

    http 302 http 303 Http 302 302是一个普通的重定向代码.直观的看来是,请求者(浏览器或者模拟http请求)发起一个请求,然后服务端重定向到另一个地址.而事实上,服务端仅仅是 ...

  9. Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html"

    2015-11-16 10:39:17.235 PullDemo[338:60b] Application windows are expected to have a root view contr ...

随机推荐

  1. 性能测试必备命令(4)- pstree

    性能测试必备的 Linux 命令系列,可以看下面链接的文章哦 https://www.cnblogs.com/poloyy/category/1819490.html 介绍 显示进程树 语法格式 ps ...

  2. 口护万亿市场杀出的实力派 Oclean欧可林

    撰文 |懂懂 编辑 | 秦言 来源:懂懂笔记 在"青年必去的电影节"上,发现了一个跟他们打成一片的智能护齿"新星". 25日,备受关注的第15届FIRST青年电 ...

  3. 使用Redis实现分布式会话

    1. 概述 传统的单体应用中,用户是否登录,通常是通过从Tomcat容器的session中获取登录用户信息判断的. 但在分布式的应用中,通常负载均衡了多台Tomcat,每台Tomcat都有自己独立的s ...

  4. Linux下运行bash脚本显示“: /usr/bin/env: "bash\r": 没有那个文件或目录

    用 ./ 运行bash脚本文件出现 报错信息 /usr/bin/env: "bash\r": 没有那个文件或目录 错误原因:这主要是因为bash后面多了\r这个字符的原因.在lin ...

  5. CodeForce-799C Fountains (记忆化DP)

    Fountains CodeForces - 799C 某土豪想要造两座喷泉.现在有 n 个造喷泉的方案,我们已知每个方案的价格以及美观度.有两种合法的货币:金币和钻石.这两种货币之间不能以任何方式转 ...

  6. Jetpack Compose学习(5)——从登录页美化开始学习布局组件使用

    原文:Jetpack Compose学习(5)--从登录页美化开始学习布局组件使用 | Stars-One的杂货小窝 本篇主要讲解常用的布局,会与原生Android的布局控件进行对比说明,请确保了解A ...

  7. 全面分析 Vue 的 computed 和 watch 的区别

    一.computed介绍 computed 用来监控自己定义的变量,该变量在 data 内没有声明,直接在 computed 里面定义,页面上可直接使用. //基础使用 {{msg}} <inp ...

  8. 启动docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

    启动docker提示: docker: Got permission denied while trying to connect to the Docker daemon socket at uni ...

  9. shell加密为二进制可执行文件

    1.下载shc工具 http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz或者到http://www.datsi.fi.upm.es/~fro ...

  10. cgroup配置

    待续... https://docs.hortonworks.com/HDPDocuments/HDP3/HDP-3.1.0/data-operating-system/content/enablin ...