https://github.com/daggerok/spring-data-jdbc-example
In progress: Quickstart with spring-data-jdbc. Fast and light releational database access almost with no overhead (no fully working... sorry)
https://github.com/daggerok/spring-data-jdbc-example
one-to-one spring-data-jdbc
Last synced: over 1 year ago
JSON representation
In progress: Quickstart with spring-data-jdbc. Fast and light releational database access almost with no overhead (no fully working... sorry)
- Host: GitHub
- URL: https://github.com/daggerok/spring-data-jdbc-example
- Owner: daggerok
- Created: 2019-03-17T00:36:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-17T14:58:38.000Z (about 7 years ago)
- Last Synced: 2025-01-10T00:41:51.628Z (over 1 year ago)
- Topics: one-to-one, spring-data-jdbc
- Language: Java
- Size: 63.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
./mvnw spring-boot:run
```
## test
_available APIs_
```bash
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:
```
```json
[
" 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_
```bash
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:
```
```json
{
"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_
```bash
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:
```
```json
[
{
"id": 1,
"name": "Undefined"
}
]
```
_list of books_
```bash
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:
```
```json
[
{
"aggregateId": "7f5d54ce-543b-4d60-9b3d-667aa0f5fcc8",
"content": "my book",
"genre": {
"id": 1,
"name": "Undefined"
},
"id": 1,
"lastModified": "2019-03-17T02:46:39.828"
}
]
```
* [YouTube: The New Kid on the Block: Spring Data JDBC](https://www.youtube.com/watch?v=AnIouYdwxo0)
* [Part 1: Spring Data JDBC - Getting started introduction](https://spring.io/blog/2018/09/17/introducing-spring-data-jdbc)
* [Part 2: Spring Data JDBC - References and Aggregates](https://spring.io/blog/2018/09/24/spring-data-jdbc-references-and-aggregates)
* [Domain-Driven Design and Spring](http://static.olivergierke.de/lectures/ddd-and-spring/)
* [YouTube: Spring Data JDBC - One to One & One to Many Relationships](https://www.youtube.com/watch?v=ccxBXDAPdmo)