https://github.com/daggerok/ddd-spring-hexagonal-architecture
Yet another DDD
https://github.com/daggerok/ddd-spring-hexagonal-architecture
api api-client api-rest ddd ddd-architecture ddd-example ddd-patterns ddd-sample feature feature-architectures features httpie idea-http-client jq layer layered-architecture one-to-many spring-data-jdbc spring-data-jdbc-one-to-many
Last synced: about 1 month ago
JSON representation
Yet another DDD
- Host: GitHub
- URL: https://github.com/daggerok/ddd-spring-hexagonal-architecture
- Owner: daggerok
- License: mit
- Created: 2020-01-31T21:07:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T15:03:49.000Z (over 5 years ago)
- Last Synced: 2025-04-30T21:09:22.202Z (5 months ago)
- Topics: api, api-client, api-rest, ddd, ddd-architecture, ddd-example, ddd-patterns, ddd-sample, feature, feature-architectures, features, httpie, idea-http-client, jq, layer, layered-architecture, one-to-many, spring-data-jdbc, spring-data-jdbc-one-to-many
- Language: Java
- Homepage:
- Size: 108 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DDD with Spring [](https://travis-ci.org/daggerok/ddd-spring-hexagonal-architecture)
Hexagonal DDD application architecture```
+----------+
| Election | Hexagonal architecture
+----------+
| 1 +------------------------------------------+
| | Infrastructure (framework related) layer |
V 0..* | +------------------------------------+ |
+-----------+ | | Application (business logic) | |
| Candidate | | | service layer | |
+-----------+ | | +------------------------------+ | |
| 1 | | | Domain (Election) layer | | |
| | | +------------------------------+ | |
V 0..* | +------------------------------------+ |
+-------+ +------------------------------------------+
| Voter |
+-------+
```## build run and test
1. build
```bash
./mvnw spring-boot:run -f feature
# ./mvnw spring-boot:run -f layer
```
1. And use [api.http file](api.http) from IntelliJ IDEA.## resources
* [H2 with PostgreSQL mode and random UUID generation by using `RANDOM_UUID()` function](feature/src/main/resources/db/migration/V1__schema.sql#L2)
* [Nice video on many-to-* mapping](https://www.youtube.com/watch?v=5rqlqon8xko)
* [Nice video on one-to-* mapping](https://www.youtube.com/watch?v=ccxBXDAPdmo)
* [Helpful link 1 (Entity)](https://github.com/daggerok/spring-data-jdbc-examples/blob/dcd2fde95222f97a6accbd8db929677c05496688/many-to-many/src/main/java/com/example/springdatajdbconetomany/SpringDataJdbcManyToManyApplication.java)
* [Helpful link 2 (SQL)](https://github.com/daggerok/spring-data-jdbc-examples/blob/dcd2fde95222f97a6accbd8db929677c05496688/many-to-many/src/main/resources/db/migration/ddl.sql)