springboot-audit-log

Record Spring Boot entity changes and actor details via AuditLogService or @Audited.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/chartsai/member-system-cc-skills --skill springboot-audit-log
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: springboot-audit-log
Source: https://github.com/chartsai/member-system-cc-skills/tree/main/springboot-audit-log
Command: npx skills add https://github.com/chartsai/member-system-cc-skills --skill springboot-audit-log

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Records who did what to which entity and when across your Spring Boot applications to enable traceability, accountability, and compliance.

Core Features & Use Cases

  • AuditLogEntry entity to store action, entity type/id, actor, timestamps, and before/after state.
  • AuditLogService for asynchronous logging of actions with optional old/new values.
  • @Audited annotation and AuditAspect for automatic logging of annotated methods.
  • Admin UI and repository filtering for quick exploration of audit trails.

Quick Start

Install and enable auditing by wiring AuditLogService calls or annotating services with @Audited, then open the admin audit log UI at /admin/audit-log to review changes.

Frequently Asked Questions about springboot-audit-log

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I record audit logs in a Spring Boot application for compliance?

To record audit logs in a Spring Boot application, you can use the AuditLogService for asynchronous logging or annotate service methods with @Audited to automatically capture actor information, entity changes, and timestamps for compliance traceability.

What is the best way to automatically track JPA entity changes in Spring Boot?

Automatically tracking JPA entity changes in Spring Boot is achieved by applying the @Audited annotation to your service methods. An AOP-based AuditAspect then intercepts these methods to capture before and after states without manual logging calls.

Does this Spring Boot audit logging feature include an admin UI for viewing trails?

Yes, this Spring Boot audit logging feature includes an admin UI. After enabling auditing, you can navigate to the /admin/audit-log endpoint to filter, explore, and review recorded audit trails and entity history directly.

Can I capture who did what to which entity without writing manual logging code?

You can capture who did what to which entity without manual logging code by using the @Audited annotation. The AOP-based AuditAspect automatically records the actor, action, entity type, and timestamps when annotated methods execute.

Do I need Flyway database migrations to set up audit trails in Spring Boot?

Yes, Flyway database migrations are included to set up audit trails in Spring Boot. The migration creates the necessary schema for the AuditLogEntry entity, ensuring action, entity ID, actor, and timestamp data are stored correctly.

Why use AOP for audit logging instead of manually calling an audit service in Spring Boot?

Using AOP for audit logging in Spring Boot separates cross-cutting auditing concerns from business logic via the @Audited annotation, whereas manually calling an audit service offers explicit control over when and what action metadata gets recorded.