Search⌘ K
AI Features

Auditing

Explore how to enable auditing in Spring Data Neo4j to automatically capture metadata like creation and modification timestamps and user details. Understand how to annotate node classes and configure AuditorAware to track changes in your graph database applications effectively.

The auditing feature provided by Spring Data Neo4j allows automatic tracking of entity changes for auditing purposes. It captures metadata such as creation and modification timestamps and user information for each entity. This auditing feature simplifies the process of capturing and managing audit information in our Neo4j-based applications.

Auditing metadata in node classes

By using annotations like @CreatedDate, @LastModifiedDate, @CreatedBy, and @LastModifiedBy, we can enable auditing on node classes to maintain a historical record of changes, which is handy for tracking data modifications.

The Book node

Let’s add properties like createdBy, dateCreated, updatedBy, and dateUpdated to the Book node class. The underlying Spring Data Neo4j ...