Scenario: For example, the front end requires you to return a json data type, but the value of some attributes in this json type is repeated, such as
{
name:zhangsan,
age:12,
teacher:[
name:Mrs Liu
subject:math
]
}
Like this, there are two names, but the front end is required to pass it like this. It ’s very painful. Both are names. I do n’t know what it means after a long time, so we have to solve it.
@JsonProperty("name")
private String teacherName;
Add this comment and it will be ok