Demo of gradle multi module project and clean architecture with Kotlin (JDK11)
gradle clean build
gradle gradle-multiple-project:spring-app-back-jpa:bootRun
run the Spring App example configured with Spring Rest Template to consume Data from external URL (Mock Server)
gradle gradle-multiple-project:spring-app-back-ws:bootRun
gradle gradle-multiple-project:manual-app:run
gradle gradle-multiple-project:graphql-app-back-jpa:bootRun
gradle gradle-multiple-project:graphql-app-back-in-memory:bootRun
.
├── core # Project core (All the business here)
│ ├── usescase # The business actions/logic
│ └── entities # The domain objects
│
|── Adapters # Retrieve and store data from and to a number of sources (database,
│ │ network devices, file system, 3rd parties, and so on.)
│ ├── in-memory-hazelcast # Example : In memory with hazelcast
│ ├── in-memory-simple # Example : Simple In memory with map
│ ├── spring-rest-template # Example : Spring Rest Template thats consume an externe URL
│ └── spring-jpa # Example : Spring Data (H2 Databse)
│
|── Config # The config folder thats put everything together
│ ├── manual-config # Configure the manual adapter (in-memory-simple)
│ ├── spring-config-jpa # Configure the Spring JPA adapter (spring-jpa)
│ └── spring-config-ws # Configure the Spring Rest Template adapter (spring-rest-template)
│
└── application # The applications can be used as front (Web, Client, batch ...)
├── manual-app # Example of console App thats use the "manual-config" config
├── spring-app-back-jpa # Example of Spring Rest App thats use the "spring-config-jpa" config
├── spring-app-back-ws # Example of Spring Rest App thats use the "spring-config-ws" config
├── graphql-app-back-jpa # Example of GraphQL App thats use the "spring-config-jpa" config
└── graphql-app-back-in-memory # Example of GraphQL Rest App thats use the "manual-config" config
Source and credit: Mattia Battiston, under CC BY 4.0, https://github.com/mattia-battiston/clean-architecture-example
- Add Unit tests
- Add end to end tests