Excluding properties from JSON processing in Struts2

后端 未结 1 875
抹茶落季
抹茶落季 2020-12-20 04:15

I have the following (full) entity class.

public class StateTable implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
             


        
相关标签:
1条回答
  • 2020-12-20 04:32

    You need to configure includeProperties in the json result. For example

    @Result(type="json", params = {"contentType", "text/javascript", "includeProperties",
      "stateTables\\[\\d+\\]\\.stateId,stateTables\\[\\d+\\]\\.stateName"}) 
    
    0 讨论(0)
提交回复
热议问题