Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ztrzaska/mongodb
Mongo noSQL embedded database with REST API
https://github.com/ztrzaska/mongodb
mongo mongodb nosql nosql-database spring-boot swagger swagger-ui
Last synced: 26 days ago
JSON representation
Mongo noSQL embedded database with REST API
- Host: GitHub
- URL: https://github.com/ztrzaska/mongodb
- Owner: ztrzaska
- Created: 2022-09-15T12:55:41.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-15T14:38:00.000Z (over 2 years ago)
- Last Synced: 2023-07-26T12:33:38.437Z (over 1 year ago)
- Topics: mongo, mongodb, nosql, nosql-database, spring-boot, swagger, swagger-ui
- Language: Java
- Homepage:
- Size: 75.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mongo noSQL embedded database with REST API
### Get started
This project demonstrates sample spring boot microservice, which use noSQL embedded mongo database.
On start-up application saves few entities to the database. Objects are stored as whole json documents and by using entity relationships with DBRef annotation.
Project facilitates REST API with swagger tool to ease invoke endpoints.### Swagger
```
http://localhost:8080/swagger-ui/
```### Database connection details and initial data
There is no authorization needed
```
mongodb://localhost:27017
```Inital data loaded on start-up
![img.png](img.png)
### Spring boot configuration
```
spring.data.mongodb.port=27017
spring.data.mongodb.database=embedded
```### Docker
```
docker build -t mongodb-java .
docker run -dp 8080:8080 mongodb-java
```### Reference Documentation
For further reference, please consider the following sections:
* [Mongodb documentation](https://www.mongodb.com/docs/)
* [Spring Data MongoDB](https://docs.spring.io/spring-boot/docs/2.7.3/reference/htmlsingle/#data.nosql.mongodb)
* [Embedded MongoDB Database](https://docs.spring.io/spring-boot/docs/2.7.3/reference/htmlsingle/#data.nosql.mongodb.embedded)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.7.3/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.7.3/maven-plugin/reference/html/#build-image)
* [Spring Web](https://docs.spring.io/spring-boot/docs/2.7.3/reference/htmlsingle/#web)### Guides
The following guides illustrate how to use some features concretely:
* [Accessing Data with MongoDB](https://spring.io/guides/gs/accessing-data-mongodb/)