Skip to content

Instantly share code, notes, and snippets.

@evonsdesigns
Last active March 12, 2019 15:29
Show Gist options
  • Select an option

  • Save evonsdesigns/bb675ba59c7ab682f1f0c4a64149ab91 to your computer and use it in GitHub Desktop.

Select an option

Save evonsdesigns/bb675ba59c7ab682f1f0c4a64149ab91 to your computer and use it in GitHub Desktop.
@Entity
public class ExamplePojo {
@Transient
private static final String type = "SomethingToInclude";
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
@Transient
@JsonGetter(value = "transientProperty")
public String getType() {
return type;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment