Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nhatthaiquang-agilityio/spring-mongodb

Example Spring Boot and MongoDB
https://github.com/nhatthaiquang-agilityio/spring-mongodb

docker mongodb spring spring-boot spring-test

Last synced: about 1 month ago
JSON representation

Example Spring Boot and MongoDB

Awesome Lists containing this project

README

        

# Spring and MongoDB
Write restful api and connect MongoDb
Pagination

# Requirements
Install mongodb on local or using docker
Java: JDK 1.8
Maven Build

# MongoDB

### Install mongodb on local

Install on Mac OS X machine with homebrew
```
brew install mongodb
```

Start MongoDb server
```
$ mongod
```

### Install mongodb on docker

```
docker-compose up
```

Check mongodb status
```
docker ps
```

Connect to mongodb
```
mongo 127.0.0.1:27017
```

Check config mongodb
src/main/resource/application.properties

# Integration Tests
An integration test based on Spring's RestTemplate