Skip to content

In progress: Quickstart with spring-data-jdbc. Fast and light releational database access almost with no overhead (no fully working... sorry)

Notifications You must be signed in to change notification settings

daggerok/spring-data-jdbc-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Data JDBC

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...)

run

./mvnw spring-boot:run 

test

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"
    }
]

About

In progress: Quickstart with spring-data-jdbc. Fast and light releational database access almost with no overhead (no fully working... sorry)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages