Bootstrap

postman使用记录

一.postman,@RequestBody ,List参数

@PostMapping("/testjson")
public Result fu(@RequestBody List<User> user) {
	
}

@Data
public class User implements Serializable {
	private static final long serialVersionUID = 1815207993413856533L;
	private Long uid;
	private String ou;
	private String skill;
	private Integer skillLevel;
	private Boolean isDefault;
	private Date reviewTime;
}

 

	[{
		"uid": "2",
		"ou": "EU",
		"skill": "EBA",
		"skillLevel": "2",
		"isDefault": false
	},{
		"uid": "2",
		"ou": "US",
		"skill": "EBA",
		"skillLevel": "2",
		"isDefault": true
	}]

注意,如果isDefault是boolean类型,接收不到参数,只有Boolean可以。

;