How to get Jackson to not output a field to XML when serializing
问题 Similar to this question I want to ignore a field in my java POJO . However, I want to always ignore the field whether or not it is null. In my case I need to populate the field value for logic but later when I am outputting my xml I do not want this field included. @AllArgsConstructor @NoArgsConstructor public class MyNotification { @Setter @Getter private String id; @Setter @Getter private String time; @Setter @Getter private String flag; @Setter @Getter private String event; @Setter