使用hibernate审计和jpa实现历史记录表

1.首先在须要记录历史的Entity上加@Auditedspring     对不须要审计的字段能够加@NotAuditedhibernate   2.配置文件中加上自定义审计历史表后缀code spring.jpa.properties.org.hibernate.envers.audit_table_suffix=_history 而后Entity的任何改动都会在history表记录了it
相关文章
相关标签/搜索