Skip to content

Instantly share code, notes, and snippets.

@sirius2k
Created July 22, 2018 11:52
Show Gist options
  • Save sirius2k/cb383dc4e0a784f408b4d9135b8c2e59 to your computer and use it in GitHub Desktop.
Save sirius2k/cb383dc4e0a784f408b4d9135b8c2e59 to your computer and use it in GitHub Desktop.
Auditing the Author of Changes with Spring Security
@Entity
@EntityListeners(AuditingEntityListener.class)
public class Bar {
//...
@Column(name = "created_by")
@CreatedBy
private String createdBy;
@Column(name = "modified_by")
@LastModifiedBy
private String modifiedBy;
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment