Skip to content

A simple Spring boot REST API and MongoDB that demonstrates the database operations like Create, Read, Update, and Delete. It also demonstrates exception handling.

Notifications You must be signed in to change notification settings

rajesh123git/springboot-mongodb-youtube-playlist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Complete REST API with Spring Data JPA and MongoDB - Todo Application

A simple Todo REST API built with Spring Data JPA that connects to the Mongodb database to perform the basic database operations such as Create, Read, Update and Delete

Requirements

  1. Java - 1.8.x

  2. Maven - 3.x.x

  3. Mongodb - 4.x.x

Steps to Setup

1. Clone the application

git clone https://github.com/scbushan05/springboot-mongodb-youtube-playlist.git

2. Create Mongodb database

use todo-manager-api

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 (springbootmongodb)

mvn package
java -jar target/springbootmongodb-v1.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 /todos

POST /todos

GET /todos/{id}

PUT /todos/{id}

DELETE /todos/{id}

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

Learn more

You can find the tutorial for this application on my blog -

https://bushansirgur.in/spring-boot-and-mongodb-rest-api-crud-tutorial-updated-2021/

About

A simple Spring boot REST API and MongoDB that demonstrates the database operations like Create, Read, Update, and Delete. It also demonstrates exception handling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%