1.首先在需要记录历史的Entity上加@Audited
对不需要审计的字段可以加@NotAudited
2.配置文件中加上自定义审计历史表后缀
spring.jpa.properties.org.hibernate.envers.audit_table_suffix=_history
然后Entity的任何改动都会在history表记录了
1.首先在需要记录历史的Entity上加@Audited
对不需要审计的字段可以加@NotAudited
2.配置文件中加上自定义审计历史表后缀
spring.jpa.properties.org.hibernate.envers.audit_table_suffix=_history
然后Entity的任何改动都会在history表记录了