From eb29711b134b03d7e38840a4b92f9701193fc69d Mon Sep 17 00:00:00 2001 From: Debrup Mondal <57451228+debrupofficial365@users.noreply.github.com> Date: Wed, 11 Aug 2021 18:36:26 +0530 Subject: [PATCH 1/2] Create 2021-08-11-configure-spring-boot-with-mongodb-application-properties.md --- ...-configure-spring-boot-with-mongodb-application-properties.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 _posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md diff --git a/_posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md b/_posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/_posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md @@ -0,0 +1 @@ + From f01c1e0cd2234916307e4f628ec7ec2e87108441 Mon Sep 17 00:00:00 2001 From: Debrup Mondal <57451228+debrupofficial365@users.noreply.github.com> Date: Wed, 11 Aug 2021 18:48:43 +0530 Subject: [PATCH 2/2] Update 2021-08-11-configure-spring-boot-with-mongodb-application-properties.md --- ...oot-with-mongodb-application-properties.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/_posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md b/_posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md index 8b137891..985f6ad1 100644 --- a/_posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md +++ b/_posts/2021-08-11-configure-spring-boot-with-mongodb-application-properties.md @@ -1 +1,48 @@ +--- +layout: post +title: Configure Spring Boot application.properties with mongoDB +date: 2021-08-10 15:00:00 +summary: In this tutorial, we will explain how to Configure Spring Boot application.properties with mongoDB +categories: Spring_Boot +permalink: /configure-spring-boot-with-mongodb-application-properties +--- + +- The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. + +- MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License. + + + +## Requirements + +- Open JDK +- Maven +- mongoDB + +## pom.xml + +```sh + + org.springframework.boot + spring-boot-starter-data-mongodb + +``` + +## application.properties + + + +```sh +spring.data.mongodb.authentication-database= in28minutes # authentication database name +spring.data.mongodb.username= debrup # login user of your mongoDB server +spring.data.mongodb.password= root # login password of your mongoDB server +spring.data.mongodb.database= in28minutes_db # name of your database +spring.data.mongodb.port= 27017 # port of mongo server +spring.data.mongodb.host=localhost # host of mongo server +``` + + +Good luck and Happy learning! + +Feel free to share it with your friends/colleagues.