Spring Boot 2 - disable Envers

老子叫甜甜 提交于 2020-02-25 11:03:00

问题


How can I disable Hibernate Envers in Spring Boot 2? I don't want to remove the dependency, because the code relies on it depending on the environment.

I tried the following properties in my application.properties but none worked. On startup it always prints envers enabled = true

spring.hibernate.integration.envers.enabled=false
hibernate.integration.envers.enabled=false
spring.jpa.hibernate.integration.envers.enabled=false

回答1:


Can you try;

spring.jpa.properties.hibernate.integration.envers.enabled=false

"Non-Spring Data JPA" Hibernate properties are configured through spring.jpa.properties.hibernate.* afaik. That might just do it!



来源:https://stackoverflow.com/questions/53337135/spring-boot-2-disable-envers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!