springboot请求参数

@ResponseBody标记的请求参数类里面,有个private String  username; 但是想要接口请求的时候,传递的属性值是Username,需要怎么做?

添加注解 @JsonProperty(value = "Username")

@JsonProperty(value = "Username")
private String username;

要是你的参数同时有username和Username,你要怎么做🌝

虽然已经决绝了,但是我还是想说命名最好要遵循驼峰规范/doge