- Java OpenJDK 15
- Insomnia
- Container Docker MySQL
- MySQL Workbench
- Spring Boot
- JPA / Hibernate
- MySQL Driver
- Clone the application
$ https://github.com./naldomadeira/rest-api-spring.git
$ cd rest-api-spring
- Create Mysql database
create database spring_database
- Change mysql username and password as per your installation
open src/main/resources/application.properties
change spring.datasource.username and spring.datasource.password as per your mysql container or installation standard
- Build and run the app using maven
mvn package java -jar target/rest-api-spring-0.0.1-SNAPSHOT.jar
Alternatively, you can run the app without packaging it using -
mvn spring-boot:run
The app will start running at http://localhost:8080.
The following is a generic localhost configuration on port: 3000 Note: base_url:
http://localhost:8080/api/v1
List of all users - GET: base_url/users
Create a user - POST: base_url/users
List a user - GET: base_url/users/{id}
Update a user - PUT: base_url/users/{id}
Delete a user - Delete: base_url/users/{id}
They were entirely carried out in the automated environment of insomnia. Insomnia is an extremely useful tool for testing manually or automating the testing of any REST API.
This API was developed by Francinaldo Madeira