Spring Boot Javers Integration
Spring Boot Javers Integration:
Spring Boot has become a standard in the
world of Java enterprise applications.
Our Spring Boot starters simplify integrating
JaVers with your application. All required JaVers beans are created and
auto-configured with reasonable defaults.
There are two starters compatible with Spring Data
and common persistence stacks:
- JaVers Spring Boot starter for MongoDB,
compatible with Spring Boot starter for Spring Data MongoDB
- JaVers Spring Boot starter for SQL,
compatible with Spring Boot starter for Spring Data JPA
Get
JaVers Spring Boot starter
MongoDB starter
Add JaVers MongoDB and Spring Data MongoDB starters
to your classpath:
compile 'org.javers:javers-spring-boot-starter-mongo:5.6.3'
compile 'org.springframework.boot:spring-boot-starter-data-mongodb:' +
$SPRING_BOOT_VERSION
SQL starter
Add JaVers SQL and Spring Data JPA starters to your
classpath:
compile 'org.javers:javers-spring-boot-starter-sql:5.6.3'
compile 'org.springframework.boot:spring-boot-starter-data-jpa:' +
$SPRING_BOOT_VERSION
In this example, we’ll show you, how we can save
the history of object/fields etc., and retrieve only those data as per need.
In this example, we’ve used latest version of
Spring Boot 2.1.6.RELEASE, Javers and JPA version as of today.
Steps to execute the project.
1.
Execute the schema.sql followed by data.sql
attached in the source code.

4.
Execute the same endpoint by changing, value to
5000

5.
Now, if you can see have created many endpoints to
get different types of changed data using different method provided by Javers

Note: All
the description about the end-point has been mentioned in the code.
Comments
Post a Comment