需要 jackson-annotations.jar,jackson-core.jar,jackson-databind.jar
text/html; charset=UTF-8 application/json;charset=UTF-8
text/html; charset=UTF-8 application/json;charset=UTF-8
@RequestMapping(value = "regist", method = RequestMethod.POST) @ResponseBody public Object regist(@RequestBody UsersEntity usersEntity) { /*System.out.println(usersEntity.toString()); UsersEntity users = new UsersEntity("zzyo","zzyo","1111@qq.com","1111"); User newuser = new UserImpl(); System.out.println(newuser.register(users));*/ String code = doRegister(usersEntity); System.out.println(code); Map map=new HashMap(); map.put("code", code); return map; }