初始化 npm install
Integer.parseInt(goods.getAgentid()),其中goods.getAgentid()中实体类是string类型
public Object register(@RequestBody String body, HttpServletRequest request) {
String username = JacksonUtil.parseString(body, "username");
String password = JacksonUtil.parseString(body, "password");
String mobile = JacksonUtil.parseString(body, "mobile");
String code = JacksonUtil.parseString(body, "code");
String wxCode = JacksonUtil.parseString(body, "wxCode");
map集合,定义map集合,以key-value形式来存储.
Map<Object, Object> data = new HashMap<Object, Object>();
data.put("nickName", user.getNickname());
data.put("avatar", user.getAvatar());
data.put("gender", user.getGender());
data.put("mobile", user.getMobile());
return ResponseUtil.ok(data);
@GetMapping("registers") public Object registers