Class AuditEventRecordBase
java.lang.Object
io.leandev.appfuse.audit.AuditEventRecordBase
稽核事件持久列的欄位基類——Spring Boot Actuator AuditEvent 的通用持久落點(框架 opt-in 服務)。
領域無關的稽核基礎設施(見 ADR-013「界線修訂 R1」):不綁任何業務/身份模型,任何應用皆可用。
Spring Security 登入/授權事件、應用層發的任意 AuditApplicationEvent(如代行稽核)皆經
PersistentAuditEventRepository(實作 Actuator AuditEventRepository)落於應用宣告的稽核表;
/actuator/auditevents 可查詢。
依 ADR-017:框架 jar
不擁有 @Entity——本類為 @MappedSuperclass,具體 @Entity(表名、索引)由應用宣告。無租戶
欄位(本實體本就領域/租戶無關,原則一不涉)。
消費方式(對齊框架「app 接線」慣例,如 notification 模組):應用宣告具體 entity(繼承本類)
與 repository(繼承 AuditEventJpaRepositoryBase),並 @Bean 宣告
PersistentAuditEventRepository(注入 repository + entity 工廠)。不需要持久化的消費端可自行
提供 Spring Boot InMemoryAuditEventRepository;
參考 app-server 的 audit Feature 已提供此 fallback。
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AuditEventRecordBase
public AuditEventRecordBase()
-