Build Restful CRUD API for a simple Note-Taking application using Spring Boot, Mysql, JPA and Hibernate.
-
Java - 1.8.x
-
Maven - 3.x.x
-
Mysql - 5.x.x
1. Credits
callicoder
2. Create Mysql database
create database employees
3. Change mysql username and password as per your installation
-
open
src/main/resources/application.properties
-
change
spring.datasource.username
andspring.datasource.password
as per your mysql installation
2. Build the app using maven
mvn package
Alternatively, you can run the app without packaging it using -
mvn spring-boot:run
The app will start running at http://localhost:8080.
The app defines following CRUD APIs.
GET /api/employees
POST /api/employees
GET /api/employees/{employeesId}
PUT /api/employees/{employeesId}
DELETE /api/employees/{employeesId}
You can test them using postman or any other rest client.