Error: request failed with status code 500, debug the front-end and back-end, and report the error “connection timeout”. Find the error self referencing loop detected for property ‘XXXX’ with type in the network
When we debug the back end step by step, we can’t find the error, but we report an error when we jump to the front end. The front end did not receive the data from the back end. Here is a summary:
**Front end receiving problems * *
the front end is receiving * * field name * * and * * type * * problems, such as name and type problems such as name, names, name: 0, name: []
data() { return { filter: { name: null, }}}, this.axios.get("/api/xxx/xxx").then((res) => { You can add a pop-up window to see if it has jumped in, jumped in is the front-end problem alert(); this.name=res; });
**Back end problem**
When we add the * * foreign key * * of the corresponding table in the database and call * the program often uses round-trip calls, or calls the current next level and so on*
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; } }
When the data is returned to the front end after the back-end processing
public xxx { var result= user.quer(); return ok(result) }
Pay attention to a problem at this time, or you will make the above mistakes
//When we refer to user // inside the class user --> id=1 LoginId=1 Login =system.Login //This is generally not an error, because LoginId does not correspond to the user table
I’m afraid that at this time, your referenced class will call our class in turn to form a logical loop
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 ——>......... //.................And so on and so on in a loop, but this itself has no error will not report an error..........................
Summary: when the foreign key of our user class is linked to the login class, and the login class is also linked to the user class, there happens to be a loginid value when outputting the user class, so that login also calls user, which will form a self-reference cycle and report an error
I hope the above can help you
Similar Posts:
- [Solved] UserInfo()’ in ‘com.example.gmall.cart.pojo.UserInfo’ cannot be applied to ‘(long, java.lang.String)’
- How to Solve Error: Request failed with status code 500
- [Solved] JAVA:java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcodbcDrive
- Can not deserialize instance of java.lang.String out of START_OBJECT token
- [Solved] Java Call Error: java.lang.IllegalArgumentException: wrong number of arguments
- Get the time value from the database and report an error: Java sql. Timestamp cannot be cast to java. lang.Long
- System.Data.SqlTypes.SqlNullValueException: ‘Data is Null. This method or property cannot be called on Null values.’
- Linux userdel: user xiaoming is currently used by process 4713
- Java error: No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Using Vue + Axios: axios.post error: request failed with status code 400 is one of the solutions