New annotations "@PrePersist" / "@PreUpdate" / "@PostPersists" / "@PostUpdate" annotations are used to define the event when the above annotations are to be injected.
@PrePersist will be the most typical use case.
@PrePersist @CurrentUser String createdBy; // Injects who created this record.
@PrePersist @CurrentTimestamp Date createdOn; // Injects when this record was created.
@PreUpdate @CurrentUser String lastUpdatedBy; // Injects who last updated this record.
@PreUpdate @CurrentTimestamp Date lastUpdatedOn; // Injects when this record was last updated.