image.png

    1. package com.wzy.springcloud.Entities;
    2. import lombok.AllArgsConstructor;
    3. import lombok.Data;
    4. import lombok.NoArgsConstructor;
    5. @Data //Getter、Setter
    6. @AllArgsConstructor //全参构造器
    7. @NoArgsConstructor //无参构造器
    8. public class CommonResult<T> {
    9. private Integer code;
    10. private String message;
    11. private T data;
    12. public CommonResult(Integer code, String message){
    13. this(code, message, null);
    14. }
    15. }