spring项目开发小记

来源:互联网 发布:淘宝售后处理时间 编辑:程序博客网 时间:2024/05/16 12:58

As you see in steps below, Spring uses the Jackson JSON library to automatically marshal instances of type Greeting into JSON.

{    "id": 1,    "content": "Hello, World!"}
package hello;public class Greeting {    private final long id;    private final String content;    public Greeting(long id, String content) {        this.id = id;        this.content = content;    }    public long getId() {        return id;    }    public String getContent() {        return content;    }}

原创粉丝点击