This project is a Spring REST API developed based on the free course from AlgaWorks.
The API connects to a MySQL database (DB) and we used Postman as the API client.
- Install Java SDK (JDK 11 >) and set
JAVA_HOME
environment variable to your system pointing to the SDK path. Note: We developed using Java 14 - Install Spring Tools based on your prefered IDE.
- Personal note: we developed using VSCode but we recommend the IntelliJ Ultimate based on its Java sugar 😉
- On VSCode
- Call commands` window by pressing:
Ctrl + Shift + P
- Run "
Spring Initializr: Edit starters
" to configure initialization scripts
- Call commands` window by pressing:
- Configure a MySQL DB to run locally based on
application.properties
configuration or edit to configure another MySQL database
Once running the application you can choose the contract language by setting the header Accept
as - application/json
or application/xml
All project dependencies are available at pom.xml since this project uses Maven.
- MySQL for local database
- Flyway
- Jakarta Persistance (A.k.a: JPA) used with Hibernate to enable ORM configuration
- Jakarta Bean Validation
- modelmapper
Roadmap for 2020.
- Create Spring project
- Add MySQL database connection
- Add DB migration control using Flyway
- Divide responsabilities between
API
andDomain
(Business logic) - Add ORMs and validations using JPA
- Create DTOs to avoid exposing unnecessary or sensitive data
- Enhance ClientController to use DTOs as input and output
- Add ServiceOrders cancellation
- Add internacionalization (I18N)