错误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. go的database/sql库中db.Exce()

    db.Exec(query string, args ...interface{}) Db.Exec(`CREATE TABLE IF NOT EXISTS STU(ID int(8) PRIMARY ...

  2. 真香!原来 CLI 开发可以这么简单

    CLI(命令行工具,Command Line Interface)大家都非常熟悉了,比如 create-react-app 等.我们今天介绍一个 CLI 工具的开发框架,可以帮助我们快速构建 CLI ...

  3. 第七章:网络优化与正则化(Part1)

    任何数学技巧都不能弥补信息的缺失. --科尼利厄斯·兰佐斯(Cornelius Lanczos) 匈牙利数学家.物理学家 文章相关 1 第七章:网络优化与正则化(Part1) 2 第七章:网络优化与正 ...

  4. Nginx系列(9)- Nginx常用命令

    Linux # 命令需要在Nginx的sbin目录下执行 cd /usr/local/nginx/sbin/ ./nginx #启动./nginx -s stop #停止 ./nginx -s qui ...

  5. css宽度+字体+颜色+边框+文本+光标+伪类选择器

    常用属性: width:宽 height:高 min-width:最小宽度 :可以设置如果宽度变小了,有个滑动效果(常常在我们布局的过程中需要去设置) min-height;最小高度 max-widt ...

  6. JavaScript 获取html元素

    1.通过ID获取: document.getElementById("idname"); 2.通过class.tagname获取: var wcyclass = document. ...

  7. 利用Qt中的ui文件生成PyQt5程序,自定义槽函数

    1.在Qt Creator4.8.0上面设计如上.ui文件 2.点击上方图标,可以建立信号-槽连接,button_click()为自定义槽函数 3.设计目的:点击clear按钮,可消除上方文本框中的内 ...

  8. P3643-[APIO2016]划艇【dp】

    正题 题目链接:https://www.luogu.com.cn/problem/P3643 题目大意 求有多少个\(n\)个数的序列\(x\)满足,\(x_i\in \{0\}\cup[a_i,b_ ...

  9. [源码解析] PyTorch 流水线并行实现 (4)--前向计算

    [源码解析] PyTorch 流水线并行实现 (4)--前向计算 目录 [源码解析] PyTorch 流水线并行实现 (4)--前向计算 0x00 摘要 0x01 论文 1.1 引论 1.1.1 数据 ...

  10. 【vue】使用 Video.js 播放视频

    目录 安装 引入 使用 参考文档 环境: vue 2.0+ element ui (这里的代码用了elmentui的按钮样式,可以不用elment ui的样式) 安装 在项目中安装 video.js. ...