https://github.com/beemi/spring-boot-mongodb-example
Spring boot service with mongoDB CRUD example
https://github.com/beemi/spring-boot-mongodb-example
crud-application mongodb rest-api spring-boot swagger swagger-ui
Last synced: about 2 months ago
JSON representation
Spring boot service with mongoDB CRUD example
- Host: GitHub
- URL: https://github.com/beemi/spring-boot-mongodb-example
- Owner: beemi
- Created: 2022-04-13T13:19:54.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-14T11:38:49.000Z (3 months ago)
- Last Synced: 2026-03-14T22:29:20.025Z (3 months ago)
- Topics: crud-application, mongodb, rest-api, spring-boot, swagger, swagger-ui
- Language: Java
- Homepage: https://jaitechltd.com/
- Size: 1.21 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-boot-mongodb-example
[](https://github.com/beemi/spring-boot-mongodb-example/actions/workflows/docker-image.yml)
Spring boot service with mongoDB CRUD example
## Description
This is a simple example of a Spring boot service with mongoDB CRUD.
## Development
Start MongoDB, Prometheus, Grafana, and the service with the following commands:
```shell
docker-compose up -d
```

Connect MongoDB using [Compass The GUI for MongoDB](https://www.mongodb.com/products/compass):

Stop the service with the following command:
```shell
docker-compose down
```
## Running MongoDB as a Docker Container
You can start a MongoDB container using Docker with the following command:
```shell
docker run -d -p 27017:27017 --name mongodb mongo
```
## Gradle build
```shell
gradle bootRun
```
## Access actuator
http://localhost:8080/actuator
http://localhost:8080/actuator/health
## Swagger UI
http://localhost:8090/api-docs/
http://localhost:8090/swagger-ui/index.html

## Prometheus (Monitoring)
http://localhost:8080/actuator/prometheus

Check Prometheus scraping metrics:
Raw metrics:
http://localhost:9090/metrics

http://localhost:9090/graph


## Contacts
Owner: [beemi.raja@gmail.com](beemi.raja@gmail.com)