Yep. It's in progress. Also.
./gradlew h2
`
## run applicatoin
```bash
./gradlew bootRun
- open http://127.0.0.1:8082/
- select h2 server
- login:
- into
jdbc:h2:tcp://127.0.0.1:9092/~/test
- as
su
user - without password
- into
http :8080/inheritance value1=ololo value2=trololo
HTTP/1.1 200 OK
Content-Length: 138
Content-Type: application/json;charset=UTF-8
# output:
{
"createdDate": "2019-03-06T02:56:6",
"data": {
"value1": "ololo",
"value2": "trololo"
},
"id": 1,
"modifiedDate": "2019-03-06T02:56:719",
"version": 0
}
update to test if @Version is working
http :8080/inheritance/1 value1=ololo value2='trololo11111oneoneone'
HTTP/1.1 200 OK
Content-Length: 152
Content-Type: application/json;charset=UTF-8
# output:
{
"createdDate": "2019-03-06T02:56:6",
"data": {
"value1": "ololo",
"value2": "trololo11111oneoneone"
},
"id": 1,
"modifiedDate": "2019-03-06T02:57:219",
"version": 1
}
echo '{
"dataFieldOfEvent1": "ololo trololo!",
"data": {
"val1": "hello!",
"val2": "hola!",
"val3": "привед!"
}
}' | http :8080/event1
HTTP/1.1 200 OK
content-length: 0
http :8080/event3 field1=one field2=two field3=three data:='{"val1":"test!"}'
HTTP/1.1 200 OK
content-length: 0
http :8080/events
HTTP/1.1 200 OK
Content-Length: 809
Content-Type: application/json;charset=UTF-8
# output:
{
"domainEvents": [
{
"createdDate": "2019-03-06T03:05:18",
"data": {
"val1": "hello!",
"val2": "hola!",
"val3": "привед!"
},
"dataFieldOfEvent1": "ololo trololo!",
"id": "7218b483-aa67-4e64-8b03-d3b483c8e7b7",
"modifiedDate": "2019-03-06T03:05:792"
},
{
"createdDate": "2019-03-06T03:05:25",
"data": {
"val1": "test!",
"val2": "default val 2",
"val3": "and 3..."
},
"field1": "one",
"field2": "two",
"field3": "three",
"id": "68bc2d3b-50be-490a-a70b-5166153a4c8e",
"modifiedDate": "2019-03-06T03:05:447"
}
],
"events1": [
{
"createdDate": "2019-03-06T03:05:18",
"data": {
"val1": "hello!",
"val2": "hola!",
"val3": "привед!"
},
"dataFieldOfEvent1": "ololo trololo!",
"id": "7218b483-aa67-4e64-8b03-d3b483c8e7b7",
"modifiedDate": "2019-03-06T03:05:792"
}
],
"events2": [],
"events3": [
{
"createdDate": "2019-03-06T03:05:25",
"data": {
"val1": "test!",
"val2": "default val 2",
"val3": "and 3..."
},
"field1": "one",
"field2": "two",
"field3": "three",
"id": "68bc2d3b-50be-490a-a70b-5166153a4c8e",
"modifiedDate": "2019-03-06T03:05:447"
}
]
}