This is a spring boot RESTfull API that uses MySQL database for storage.
List of: things regarding this project include:
- Java
- Spring-boot
- Maven
- Unit-test
- JPA
- MySQL
- Intellij
- Apache Tomcat/9.0.56
- Hibernate
The API is configured to run on embedded Tomcat server that will startup when the project starts runing on localhost at port 8080, and expects a running instance of MySQL database server on localhost port 3306 and a database name called my_sql_db_test for storage.
Sql Database connection configuration is in application.properties
configuration file.
#####API end-points url:
Action | Url | HTTP method |
---|---|---|
Get all | http://localhost:8080/api/v1/data | GET |
Get 1 | http://localhost:8080/api/v1/data/{id} | GET |
Create | http://localhost:8080/api/v1/data | POST |
Update | http://localhost:8080/api/v1/data/{id} | PUT |
Delete | http://localhost:8080/api/v1/data/{id} | DEL |
Create and update requiere JSON payload in the http request body! Example:
{
"firstName": "John",
"lastName": "Martin",
"emailId": "johnmart@example.com"
}
For further reference for included techs, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Data JPA
The following guides illustrate how to use some features concretely: