What libraries have you imported (adle or maven pom file).Which version of Spring Boot are you on.If above does not works, then please provide more information This will help you identify if error is due to Hibernate Envers or if your application code has other issues. Try removing/disabling the Hibernate Envers audit code and library dependencies and see if can you get your application up and running. Generally you should not require any other Hibernate library other than Spring Boot Data JPA and Hibernate Envers Looking at the exception it is clear that application is failing since it is not able to find bean dependencyĬheck your library imports first in your adle or pom.xml. But it may not be sufficient to identify the root cause. As you can see in the java docs, that method was introduced in AuditQuer圜reator in version 5.3.Īs a consequence, you need to provide the following dependency: īut in addition you also need to provide a compatible version of both hibernate-entitymanager and hibernate-core: But you probably still need to include the annotation.Īlthough I initially indicated that you can let Spring Boot manage your versions, due to the one of spring-boot-starter-parent, the framework is providing you versions of hibernate-xxx similar to 5.2.17.Final.īut, as you indicated, you need to use the method forRevisionsOfEntityWithChanges for querying your audit entities. Even in that case, you can use Envers on its own to obtain that information if required.īe aware that, as indicated in the comments of the answer from Sunit, you will need to remove the attribute repositoryFactoryBeanClass, it could not longer take the value EnversRevisionRepositoryFactoryBean. Please, first, remove the spring-data-envers dependency, unless you are querying your audit tables you do not need it. I think your problem could be related with the different dependencies in your pom.xml.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |