Here is a example:

// AController.java
@PostMapping
public String add(@RequestBody @Validated Form form) {
        ...
}
// Form.java
@Data
public class Form {
    private String aType;
    private String bAbc;
    private Integer cDef;
}

request:

{
  "aType":"123",
  "bAbc":"abc",
  "cDef":1
}

0

All of the field in object 'from' will be null.

Comment From: xixingya

because jackson default use legacyManglePropertyName this logic is

After removing set, the first letter set lowercase,

After the second letter is lowercase, compare it with the lowercase of the second letter. If it is all lowercase, then directly connect it and return,

If the second letter is capitalized, use the lowercase case, connect it, and look for the next letter until you find a lowercase letter.

you can use @JsonProperty("aType") fix it, or use gson etc.

Comment From: jojocodeX

spring allows you to customize HttpMessageConverters and replace the default configuration of the framework

Comment From: q1bksuu

because jackson default use legacyManglePropertyName this logic is

After removing set, the first letter set lowercase,

After the second letter is lowercase, compare it with the lowercase of the second letter. If it is all lowercase, then directly connect it and return,

If the second letter is capitalized, use the lowercase case, connect it, and look for the next letter until you find a lowercase letter.

you can use @JsonProperty("aType") fix it, or use gson etc.

ok,thanks

Comment From: q1bksuu

spring allows you to customize HttpMessageConverters and replace the default configuration of the framework

ok,thanks