Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thainguyencoffee/implement-ddd-spring-boot

Implement DDD and Hexagonal architecture with Spring
https://github.com/thainguyencoffee/implement-ddd-spring-boot

clean-architecture ddd hexagonal

Last synced: about 2 months ago
JSON representation

Implement DDD and Hexagonal architecture with Spring

Awesome Lists containing this project

README

        

# Implement DDD Spring Boot

[![Java CI with Gradle](https://github.com/thainguyencoffee/implement-ddd-spring-boot/actions/workflows/build.yaml/badge.svg)](https://github.com/thainguyencoffee/implement-ddd-spring-boot/actions/workflows/build.yaml)

## Project description

The project uses:

* [Official Gradle documentation](https://docs.gradle.org)
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/3.3.3/gradle-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.3.3/gradle-plugin/packaging-oci-image.html)
* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/3.3.3/reference/htmlsingle/index.html#data.sql.jpa-and-spring-data)
* [Validation](https://docs.spring.io/spring-boot/docs/3.3.3/reference/htmlsingle/index.html#io.validation)
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.3.3/reference/htmlsingle/index.html#web)
* [Spring Modulith](http://github.com/spring-projects/spring-modulith)
* [jMolecules](https://github.com/xmolecules/jmolecules)

### Spring Data JPA

The Spring Data repository mechanism is used to reduce the effort to implement persistence for the domain objects to the
declaration of an interface per aggregate root

### Spring Modulith

Spring Modulith supports modular architecture in monoliths. It treats each root-level package as a separate module with
top-level public members exposed as API and all other code protected as module-internal (unless explicitly specified
otherwise). Through tests, it verifies compliance to modular architecture rules and also generates documentation for
architecturally relevant components of the system. See `ModularityTests` and also `build/spring-modulith-docs/`, once
the test has been executed.

### How to deploy to Heroku
1. Login to heroku
```bash
heroku login -i
```

2. Create app
```bash
heroku create
```

3. Initial git repository
```bash
git init
```

```bash
git remote add heroku
```

```bash
git add .
```

```bash
git commit -m "initial commit"
```

```bash
git push heroku main
```