序列和反序列設定,可以設定物件轉換模式
EX:
package com.bean.response; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @lombok.Data @JsonInclude(JsonInclude.Include.NON_EMPTY) public class Response { @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) String message; @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) String code; }
文章標籤
全站熱搜
留言列表