NERV Audit is an open-source Java 21 audit-trail library for Spring Boot applications. It has a stable API boundary, a Hibernate Envers implementation, a transport-independent operations API, and an optional HTTP management surface.
nerv-audit-apicontains public contracts, DTOs, query models, enums, and extension points.nerv-audit-coreimplements the contracts with Hibernate Envers listeners, repositories, query builders, and audit services.nerv-audit-operationsprovides transport-independent, read-only audit search and history operations by delegating to Core.nerv-audit-operations-webprovides optional Spring MVC management endpoints over Operations.nerv-audit-spring-boot-starteraggregates the four modules and is the recommended dependency for Spring Boot applications.
- Java 21
- Maven 3.9 or newer
- Spring Boot 4.x and Hibernate Envers in the consuming application
Add the starter. It brings in Core, Operations, and Operations Web transitively and requires no manual assembly, license, activation, additional repository, or credentials.
<dependency>
<groupId>com.czetsuyatech.nerv</groupId>
<artifactId>nerv-audit-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>nerv:
audit:
audit-strategy-type: VERTICAL # VERTICAL (default) or HORIZONTAL
audit-insert: false
audit-fields: createdBy,created,updatedBy,updated,originalId,revisionType,version
operations:
web:
enabled: true
base-path: /management/nerv-auditEntities must be Envers-versioned, for example with @Audited. Define an AuditTableResolver bean
to override the default {entity-table}_AUD table resolution.
With nerv.audit.operations.web.enabled=true, the starter exposes its opt-in operations surface:
GET /management/nerv-audit/audits/vertical
GET /management/nerv-audit/audits/vertical/{entity}
GET /management/nerv-audit/audits/horizontal/{entity}
Vertical audit queries support filters such as id, revisionNo, updatedBy, fieldName,
newValue, oldValue, fromDate, toDate, sortBy, sortDirection, page, and size.
GET /management/nerv-audit/audits/vertical/UserEntity?id=101&updatedBy=admin&page=0&size=20
For advanced integrations, depend directly on the individual module that owns the needed boundary. Normal Spring Boot applications should depend only on the starter.
Run the complete build from the repository root:
mvn clean verifyTo install the artifacts for local development:
mvn clean installNERV Audit is licensed under the Apache License 2.0. Report bugs or feature requests through the repository's GitHub issues page.