Quickstart with spring-data-jdbc. Fast and light relational database access almost with no overhead (still many opened questions here and a lot of stuff to learn...)
./mvnw spring-boot:run
available APIs
http :8080
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
Date: Sun, 17 Mar 2019 00:45:30 GMT
Transfer-Encoding: chunked
# output:
[
" get books: http get :8080/books",
" find book: http get :8080/book/{id}",
" delete book: http delete :8080/book/{id}",
" create book: http post :8080 content={content}"
]
create a book
http :8080 content="my book"
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
Date: Sun, 17 Mar 2019 00:46:39 GMT
Transfer-Encoding: chunked
# output:
{
"aggregateId": "7f5d54ce-543b-4d60-9b3d-667aa0f5fcc8",
"content": "my book",
"genre": {
"id": 1,
"name": "Undefined"
},
"id": 1,
"lastModified": "2019-03-17T02:46:39.828"
}
list of genres
http :8080/genres
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
Date: Sun, 17 Mar 2019 00:47:18 GMT
Transfer-Encoding: chunked
# output:
[
{
"id": 1,
"name": "Undefined"
}
]
list of books
http :8080/books
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
Date: Sun, 17 Mar 2019 00:47:50 GMT
Transfer-Encoding: chunked
# output:
[
{
"aggregateId": "7f5d54ce-543b-4d60-9b3d-667aa0f5fcc8",
"content": "my book",
"genre": {
"id": 1,
"name": "Undefined"
},
"id": 1,
"lastModified": "2019-03-17T02:46:39.828"
}
]