/spring-boot-javadb-rest-api-tutorial

Building a Restful CRUD API using Spring Boot, JAVADB, JPA and Hibernate

Primary LanguageTSQL

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

Steps to Setup

1. Clone the application

https://github.com/rksharma1401/spring-boot-javadb-rest-api-tutorial

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

2. 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/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

You can find the applciation deployed on

http://javadbspringboot-dock.1d35.starter-us-east-1.openshiftapps.com