forked from tericcabrel/blog-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42bf85a
commit 9389872
Showing
1 changed file
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
# Spring Boot with MongoDB | ||
This project show how to use MongoDb in a Spring Boot project. | ||
This project show how to use MongoDB in a Spring Boot project. | ||
|
||
# Installation | ||
1. Clone the repository | ||
2. Enter the project's directory | ||
3. Create application.properties file from application-example.properties | ||
4. Update application.properties with your own configuration | ||
5. install maven dependencies `mvn install` | ||
6. run the application `mvn spring-boot:run` | ||
7. Test endpoints with Postman or other REST client | ||
|
||
- Clone the repository | ||
|
||
- Enter the project's directory | ||
|
||
- Create a container of MongoDB | ||
|
||
```shell | ||
docker run -d --rm --name championship-db -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=secret mongo:6.0 | ||
``` | ||
- Create application.properties file from application-example.properties | ||
|
||
- Update application.properties with your own configuration | ||
|
||
- install maven dependencies `mvn install` | ||
|
||
- run the application `mvn spring-boot:run` | ||
|
||
- Test endpoints with Postman or other REST client |