Skip to content
Advertisement

Tag: hibernate-envers

Why AuditReader can’t be Autowired in the Repository

IN my springbootapp I have the following repository:- When I run this app. I got this error:- Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. 2020-12-24 21:09:15 – APPLICATION FAILED TO START Description: Parameter 0 of constructor in com.howtodoinjava.demo.repository.RevisionRepository required a bean of type ‘org.hibernate.envers.AuditReader’ that could not be found. Action: Consider defining a

How to inject spring beans into the hibernate envers RevisionListener

I am using Spring 5.1 and Hibernate 5.3.9 including hibernate-envers. I don’t know how to inject spring beans into the hibernate envers custom RevisionListener. I have tried Of course the class is included in the @ComponentScan packages resolution. A problem is that myService is not injected into the listener. In the hibernate-envers documentation: https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#envers-basics As of Hibernate Envers 5.3, dependency

Advertisement