@RequestMapping(value = "", method = RequestMethod.POST)
public Result get(@RequestBody User user,
@RequestParam("username") String hehe) throws Exception {
}
如何能够接受user对象的同时,同时接受username?
假设User对象为
public class User {
private String id;
private String username;
private String email;
private String phone;
}
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证高级PHP讲师