Skip to content

mukeshkamboj/spring-data-mongodb-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

This is sample project that demonstrate the use of spring data with mongodb.

Follow the below steps to setup the application.

  1. Install the mongodb . Don't make any change in settings keep default port settings.
  2. clone git@github.com:mukeshkamboj/spring-data-mongodb-example.git
  3. go to spring-data-mongodb-example folder
  4. gradle clean build
  5. java -jar build\libs\spring-data-mongodb-example-1.0.jar . This will make the server up and running on port localhost:8080

####You can post the information like

curl -H "Accept:application/json" -H "Content-Type:application/json" --data '{"firstName":"Devainder","lastName":"Khera","userName":"dkamboj","primaryAddress":{"id":"5665c707046d7b3148b918e4","street1":"PKL","street2":null,"city":null,"country":null,"state":null,"pinCode":null,"landmark":null,"type":null},"addresses":[{"id":"5665c707046d7b3148b918e4","street1":"PKL","street2":null,"city":null,"country":null,"state":null,"pinCode":null,"landmark":null,"type":null}]}' localhost:8080/user

To get the information

curl -XGET localhost:8080/user/dkamboj

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages