The problem that vue axios requests parameters to carry an array of objects to ssm

{oldUserKey: "admin@agriocom.com", user: {,. }
oldUserKey: "admin@agriocom.com"
user: {,. }
permissions: [{objType: "SERVER", objId: "0", right: "A"}, {objType: "STATION", objId: "0", right: "A"}, ]
0: {objType: "SERVER", objId: "0", right: "A"}
1: {objType: "STATION", objId: "0", right: "A"}
2: {objType: "USER", objId: "0", right: "A"}

the request is sent to the SSM framework and returns 400, and the relevant java class definition conforms to the naming of the data structure. After testing, it is not possible to parse permissions.

@ Document (collection = "users")

public class User {

@JsonIgnore
private String _id;
private String name;
private String password;
private List<Permission> permissions;
private String fullName;
private String email;
private String phoneNumber;
private String address;
private String company;
private String status;  //   0- 1- -1-
@JSONField(name="_id")

can you take a look at it?

Mar.16,2022

do not use this way of writing. If your backend accepts a very complex parameter, you should accept it with a string, and then parse the string. You can parse the string to everything else, so that the front end passes the parameters directly (json format), and your backend parses very quickly. Don't pass an array, if you have to, why don't the backend do split once, so that the front-end processing is simple and the back-end processing is simple. I have seen too many people ask how to pass the array

Menu