https://github.com/javers/organization-structure
Sample apllication demonstrating use of Javers-spring-boot-starter-mongo
https://github.com/javers/organization-structure
Last synced: about 1 year ago
JSON representation
Sample apllication demonstrating use of Javers-spring-boot-starter-mongo
- Host: GitHub
- URL: https://github.com/javers/organization-structure
- Owner: javers
- License: apache-2.0
- Created: 2015-12-12T08:45:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-08-21T15:36:24.000Z (almost 7 years ago)
- Last Synced: 2025-04-19T10:27:43.799Z (about 1 year ago)
- Language: Java
- Size: 178 KB
- Stars: 11
- Watchers: 11
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# organization-structure
Sample application demonstrating use of JaVers Spring Boot starters.
## spring-boot-starter-data-mongodb
To start app execute (requires MongoDB (3.0.0+) running on port 27017):
```
./gradlew organization-structure-mongo:run
```
or run on H2:
```
./gradlew organization-structure-sql:run
```
## REST API
### Application exposes REST interface:
```
http://localhost:8080/view/hierarchy
http://localhost:8080/view/hierarchy/Hier_2015
http://localhost:8080/view/persons
http://localhost:8080/view/person/0
```
### Make some changes on Frodo
```
http://localhost:8080/audit/test
```
### Create new person:
```
POST http://localhost:8080/view/person
{
"id": 101,
"firstName": "Yang",
"lastName": "Huajie",
"sex": "MALE",
"salary": 1000,
"position": "DEVELOPER"
}
```
### Update person:
```
PUT http://localhost:8080/view/person
{
"id": 101,
"firstName": "Yang",
"lastName": "Huajie",
"sex": "MALE",
"salary": 1022,
"position": "DEVELOPER"
}
```
### View audit data
```
http://localhost:8080/audit/persons
http://localhost:8080/audit/person/0
http://localhost:8080/audit/person/snapshots
http://localhost:8080/audit/person/0/snapshots
```