Sales API project consists a couple of the endpoints to manager customers and address like GET /customers, and GET /address and for a technical evaluation using Java Technology with Spring Boot, RESTFUL, build in Maven archetype and persistence with MariaDB database.
-
Having Java 8 or higher installed on your computer or laptop:
-
Clone the project by running the command in a folder of your choice:
git clone https://github.com/jamilsolutions/sales.git-
Enter the directory where the project was cloned and open a command prompt with Git Bash:
Note: 1. If you do not have git installed use this link to install:
- https://git-scm.com/downloads
- Git Tutorial at https://git-scm.com/book/pt-br/v2
-
Download Maria DB from server: https://mariadb.com/products/community-server/
-
Unpack MariaDB from bin folder to:
C:\Programas\Database\h2- Start MariaDB from bin folder:
C:\Programas\Database\h2\bin\h2.bat- Run the command in the project /sales with the command:
mvn runNote: 1. Alternative run Run the application with jar command line:
- Enter in the project /bin forder at
- Run the command:
java -jar sales-0.0.1-SNAPSHOT.jar
- MAVEN_HOME=C:/Programas/Apache/apache-maven-3.8.6
- PATH=%MAVEN_HOME%/bin
Note: 2. If you do not have Maven installed use this link to install:
- https://maven.apache.org/download.cgi
- Unpack at C:/Programas/Java/apache-maven-3.8.6-bin.zip
- Create a Variable of Environment to Maven
- MAVEN_HOME=C:/Programas/Apache/apache-maven-3.8.6
- PATH=%MAVEN_HOME%/bin
- Open Postman and import the Secure collection "API Sales REST.postman_collection.json" file:
Postman -> File -> Import -> Select folder or Upload the file -> Confirm import.- Run the collection Sales:
Run Collection Runner -> Run the "API Sales REST".- Completed. Great job!
-
Download JDK 11 from Oracle.com -> Java SE 11 Archive Downloads: Windows x64 Compressed Archive: https://www.oracle.com/br/java/technologies/javase/jdk11-archive-downloads.html
-
Unpack the jdk-11.0.16.1_windows-x64_bin at Java folder: C:/Programas/jdk-11.0.16.1
-
Create a Variable of Environment to JDK: JAVA_HOME=C:/Programas/jdk-11.0.16.1 PATH=%JAVA_HOME%/bin
-
Install the 64-bit Git for Windows Setup from: https://git-scm.com/download/win
-
CLone the project with: git clone https://github.com/jamilsolutions/sales.git
-
Open the IntelliJ IDEA from: C:/Programas/ideaIU-2022.3.win/bin/IDEA64.exe
-
Open the project with IntelliJ IDEA from: /sales