0%
springboot 基础
注解
@CrossOrigin
跨域处理
json处理
springboot集成jackson
工具
简单使用
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| @JsonIgnore public String getPassword() { return password; }
ObjectMapper mapper = new ObjectMapper(); User user=new User(); String jsonstr=mapper.writeValueAsString(user);
@RestController public class UserControl { @RequestMapping(value = "register", method = RequestMethod.POST) public Msg userReg(@RequestBody User user) { return user; } }
|