Skip to content

Commit

Permalink
Add Java config example, fix StackOverflow tag URL.
Browse files Browse the repository at this point in the history
Original pull request #282
  • Loading branch information
scordio authored and schauder committed Feb 26, 2021
1 parent 7e22a76 commit ffd2474
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,24 @@ You can pull in this functionality to your repositories by simply additionally e
----
interface PersonRepository extends RevisionRepository<Person, Long, Integer>, CrudRepository<Person, Long> {
// Your query methods go here
// Your query methods go here
}
----

To successfully activate the Spring Data Envers repository factory use the Spring Data JPA repositories namespace element's `factory-class` attribute:
To successfully activate the Spring Data Envers repository factory, use the Spring Data JPA's `@EnableJpaRepositories` annotation, specifying the `repositoryFactoryBeanClass` attribute:

[source,java]
----
@Configuration
@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)
public class ApplicationConfiguration {
// Your configuration beans
}
----

or use the Spring Data JPA repositories namespace element's `factory-class` attribute, in case of XML configuration:

[source,xml]
----
Expand Down Expand Up @@ -81,7 +94,7 @@ Having trouble with Spring Data? We’d love to help!
https://docs.spring.io/spring-data/envers/docs/current/reference/html/[reference documentation], and https://docs.spring.io/spring-data/envers/docs/current/api/[Javadocs].
* Learn the Spring basics – Spring Data builds on Spring Framework, check the https://spring.io[spring.io] web-site for a wealth of reference documentation.
If you are just starting out with Spring, try one of the https://spring.io/guides[guides].
* Ask a question - we monitor https://stackoverflow.com[stackoverflow.com] for questions tagged with https://stackoverflow.com/tags/spring-data[`spring-data-envers`].
* Ask a question - we monitor https://stackoverflow.com[stackoverflow.com] for questions tagged with https://stackoverflow.com/tags/spring-data-envers[`spring-data-envers`].
You can also chat with the community on https://gitter.im/spring-projects/spring-data[Gitter].
* Report bugs with Spring Data envers at https://github.com/spring-projects/spring-data-envers/issues[github.com/spring-projects/spring-data-envers/issues].

Expand Down

0 comments on commit ffd2474

Please sign in to comment.