Student stu() { this.setId(38L); this.setName("38号"); return this; } // System.out.println(JSON.toJSON(new Student().stu())); // TODO: {"name":"38号","id":38}
this简化返参代码
原文:https://www.cnblogs.com/Twittery/p/14763893.html