问题
i am creating a maven multimoduled project one of the module for the hibernate entity only , issue is two services/api/maven_project are using same module , but one requires auditing but other dont , how i can keep my code intact (means ,without changing or removing @Audited annotation) , how to enable or disable envers auditing at run time or compile time, because after everything i have tried auditing is working for both api
i have tried
spring.jpa.properties.hibernate.integration.envers.enabled=false
spring.jpa.properties.hibernate.listeners.envers.autoRegister=false
spring.jpa.properties.hibernate.envers.autoRegisterListeners=false
hibernate.integration.envers.enabled=false
hibernate.listeners.envers.autoRegister=false
hibernate.envers.autoRegisterListeners=false
回答1:
As per buræquete's answer
spring.jpa.properties.hibernate.integration.envers.enabled=false
Would do the job.
"Non-Spring Data JPA" Hibernate properties are configured through
spring.jpa.properties.hibernate.*
来源:https://stackoverflow.com/questions/56848898/how-to-disable-envers-auditing-for-spring-boot