Right now we are using 0.3.0.RELEASE to get the revision data and noticed that the revisions are fetched in ascending order. the existing code
@EnableJpaRepositories( value = "org.xxx.xxx.xxx.repository", repositoryFactoryBeanClass = RevisionRepositoryFactoryBean.class )
@EnableJpaAuditing( auditorAwareRef = "springSecurityAuditorAware" )
@EnableTransactionManagement
public class DatabaseConfiguration {
.......
}
public class RevisionRepositoryFactoryBean extends EnversRevisionRepositoryFactoryBean {
public RevisionRepositoryFactoryBean() {
setRevisionEntityClass( Revision.class );
}
}
Found that the newer version 2.0.0.RELEASE has functionality to sort based on sort in pageable object. So wanted to use 2.0.0.RELEASE.
the following is the modifications
public class RevisionRepositoryFactoryBean<T extends RevisionRepository<S, ID, N>, S, ID extends Serializable, N extends Number & Comparable<N>> extends EnversRevisionRepositoryFactoryBean<T, S, ID,N> {
public RevisionRepositoryFactoryBean(Class<? extends T> repositoryInterface) {
super(repositoryInterface);
setRevisionEntityClass( Revision.class );
// TODO Auto-generated constructor stub
}
}
but did not work... compile error in DatabaseConfiguration file
No constructor with 0 arguments defined in class 'org.xxx.xxx.xxx.config.RevisionRepositoryFactoryBean'
Do anyone has an example how to use spring-data-envers -2.0.0.RELEASE in spring boot application. Thanks Srini