Skip to content

Spring guide to the process of using Spring Data MongoDB to build an application that stores data in and retrieves it from MongoDB

Notifications You must be signed in to change notification settings

alismed/accessing-data-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Accessing Data with MongoDB

Example to connect in a MongoDB Server with Spring Boot

Using Docker.

Setup

# Use the oficial container
docker pull mongo

Run mongodb server

$ docker run --name mymongo -v [local-path]:/data/db -p 27017:27017 -d mongo

Stop mongodb server

$ docker stop mymongo

Run

$ mvn clean && mvn install
$ java -jar target/accessing-data-mongodb-0.0.1.jar 

Test

$ mongo 
 > show dbs
 > use test
 > show collections
 > db.customer.find()

About

Spring guide to the process of using Spring Data MongoDB to build an application that stores data in and retrieves it from MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages