springMvc will automatically ignore annotation mode object specific attributes of an object returned json

1. Notes the use of the class name, interface heads

@JsonIgnoreProperties (value = { "comid"}) // filter out the desired dynamic properties  

Case

@JsonIgnoreProperties(value={"comid"}) 
   public interface CompanyFilter{   

2. The notes used in the get method head

@JsonIgnore

   Case  

 @JsonIgnore
    public Integer getPageSize(){
           return Integer.valueOf(getRows()==null?"0":getRows().toString());
    }

 

This switched: https://blog.csdn.net/sanjay_f/article/details/47304509

Guess you like

Origin www.cnblogs.com/nizuimeiabc1/p/11030232.html