faizakram / spring-boot-mysql-rest-api-tutorial-master

Spring Boot

Home Page:http://faizakram.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Boot, MySQL, JPA, Hibernate Rest API Tutorial

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

Requirements

  1. Java - 1.8.x

  2. Maven - 3.x.x

  3. Mysql - 5.x.x

  4. Swagger

  5. Scheduler

  6. Java Mailing

  7. VelocityEngine

Steps to Setup

1. Clone the application

git clone https://github.com/faizakram/spring-boot-mysql-rest-api-tutorial-master.git

2. Create Mysql database

create database notes_app

3. 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

4. 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

#Swagger URL:- http://localhost:8080/swagger-ui.html#/

The app will start running at http://localhost:8080.

Explore Rest APIs

The app defines following CRUD APIs.

GET /api/notes

POST /api/notes

GET /api/notes/{noteId}

PUT /api/notes/{noteId}

DELETE /api/notes/{noteId}

You can test them using postman or any other rest client.

Learn more

About

Spring Boot

http://faizakram.com/


Languages

Language:Java 97.7%Language:TSQL 2.3%