Skip to content

Latest commit

 

History

History
37 lines (37 loc) · 2.63 KB

README.md

File metadata and controls

37 lines (37 loc) · 2.63 KB

Readme.md
Spring Boot, MySQL, JPA, Hibernate Rest API Tutorial
Build Restful CRUD API for a simple Note-Taking application using Spring Boot, Mysql and JPA .

Requirements
Java - 1.8.x

Maven - 3.x.x

Mysql - 5.x.x

Steps to Setup

  1. Clone the application

git clone https://github.com/Pushpraj777/spring-boot-mysql-rest-api.git

  1. Create Mysql database

create database mydb

  1. 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 installation

  1. Build and run the app using maven

mvn package
java -jar target/easy-notes-1.0.0.jar
Alternatively, you can run the app without packaging it using -

mvn spring-boot:run
The app will start running at http://localhost:8080.

Explore Rest APIs
The app defines following CRUD APIs.

GET /api/mydb

POST /api/mydb

GET /api/mydb/{Id}

PUT /api/mydb/{Id}

DELETE /api/mydb/{Id}
You can test them using postman or any other rest client.