advancedSpring Boot Core

How would you design an audit logging system for every database change?

For simple field-level tracking, Spring Data's @CreatedDate/@LastModifiedDate/@CreatedBy/@LastModifiedBy with @EnableJpaAuditing cover who/when. For a full change history, use Hibernate Envers (automatic revision tables) or write changes to a separate audit_log table inside the same transaction as the business write, capturing old/new values and the acting user.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

How would you design an audit logging system for every database change?

Next Step

Continue to How would you rate-limit APIs differently for different customers or tenants?← Back to all Spring Boot & Microservices questions