3.1 KiB
Rviewer skeleton: Java, Spring & PostgreSQL
This repository is a Java skeleton with Spring & PostgreSQL designed for quickly getting started developing an API. Check the Getting Started for full details.
Technologies
Getting Started
Within the Makefile you can handle the entire flow to get everything up & running:
- Install
makeon your computer, if you do not already have it. - Start the application:
make up - Run the application tests:
make test
As you could see on the Makefile script and the Docker-Compose File, the whole API is containerized with Docker and the API is using the internal DNS to connect with the PostgreSQL instance.
Go to http://127.0.0.1:8080/ping to see that everything is up & running!
Overview
This skeleton is based on a Clean Architecture approach, so you could find the first basic layers:
You could find here two amazing articles (here and here) explaining the Clean Architecture with Java! (credits to @bertilMuth and @ryanthelin).
Infrastructure
Here you will find the different files to interact with the outside. In this folder you there are two different folders:
controllers: Here you will have the classes that handle the REST endpoints and the Request/Responsepersistence: Here it is the persistence layer, which interact with the PostgreSQL database, decoupling the rest of the application
You can use this as a starting point to continue with this architecture, or adapt it to your preferences.
Domain
Any of your domain Entities, or Services, that models your business logic. These classes should be completely isolated of any external dependency or framework, but interact with them. This layer should follow the Dependency Inversion principle.
Support
If you are having problems or need anything else, please let us know by raising a new issue.
License
This project is licensed with the MIT license.
Made with ❤️ by Rviewer