The objective with this project is to study and test Spring Boot API's with JPA, Lombok, and Heroku deploys 😎.
- Maven
- Java 11 or later
- Docker
- docker-compose
Clone the repo and navigate to the project's folder open the terminal and execute the commands bellow
cp env.example.properties .env # Copy env example as .env
The API's sending e-mail feature depends on configuration, so, to test this scenario, you need to configure mail server information
MAIL_HOST=
MAIL_USER=
MAIL_PASSWORD=
MAIL_PORT=
After that, you're good to go. Run:
mvn clean package # Creates JAR file
docker-compose up # Spin up all necessary containers
Create a client CRUD ✔
- Create client
- Update client
- Delete client
- List clients
- Find a specific client
- Control all operations above with DTO's pattern
- Use Bean validation to validate data before saving in the DB
Implement Exception handling ✔
- Create models and classes for exception handling
- Define exception handling in the service layer
Database
- Persist the previous task results with PostgreSQL
Virtualization ✔
- Use Docker
- Use docker-compose to manage containers spin up/down
- Use environment files to load the container variables dependencies
Third part libs ✔
- Try ModelMapper
Tests
- Try JUnit
- Add ClientService tests
- Add ClientController tests
- Send e-mail after creating a client successfully
- Create a separate service to send email
- Use some topic/subscription structure to send emails independently
- Refactor the ClientService to send emails using messages to a topic or queue
Docs ✔
- Add swagger OpenAPI specification
Made with ❤ by rpsilva