Workshop Spring-boot MongoDB

ℹ️ Information

The project was developed during the Java programming course by instructor Nélio Alves. A post creation system was implemented. Where the user can create their posts and comment on other users' posts. It was developed only as part of the system's backend and to be able to carry out the tests it will be necessary to install the programs: postman or insomnia. But you can choose which one pleases you the most. In order to view, insert and delete data in the mongoDB database, install or mongoDBCompass for greater convenience. Next, the class diagram that was followed for the development of the system is presented. The MVC standard and the DTO standard were followed to develop this system.

⚠️ Prerequisite

Java Badge >= 8

Spring Badge

JSON Badge

mongodb

mongodbcompass

JPA-hibernate (1)

Postman Badge OR Insomnia Badge

📌 Class Diagram

diagrama de classe

🔧 Install

https://github.com/RamonBecker/workshop-spring-boot-mongodb.git

git clone https://github.com/RamonBecker/workshop-spring-boot-mongodb.git
or install github https://desktop.github.com/ 

⚙️ Testing the project

To test the project you will need to clone the repository on your machine. You can choose both tools: postman or insomnia.

To download postman go to the following link: https://www.postman.com/downloads/
To download insomnia rentre from the following link: https://insomnia.rest/download

To test some system functionality in postman or insomnia. Type the following urls in the url as shown below:

To test a full search:

http://localhost:8080/posts/fullsearch?text=enjoy&minDate=2021-10-24&maxDate=2021-10-25

To search a user search by id

http://localhost:8080/users/enter id as per the database

To search posts by user id

http://localhost:8080/users/posts/enter id as per the database

To search for posts with common titles

http://localhost:8080/posts/titlesearch?text=Good%20Morning

according to the image below, to perform, for example, the GET operation, to search for all users in the database.

The following HTPP methods were implemented: PUT, DELETE, GET and POST.

The example was performed using Postman.

teste

Install database MongoDB

Download MongoDB through the website:

https://www.mongodb.com/try/download/community

Download MongoDBCompass through the website.

https://www.mongodb.com/try/download/compass

Choose your preferred operating system.

If there are any doubts about installing mongoDB, consult the official documentation through the website:

https://docs.mongodb.com/manual/installation/


⚡ Technologies

  • Java
  • JPA
  • Spring Boot
  • MongoDB
  • MongoDBCompass

📝 Developed features

  • CRUD User
  • CRUD Post
  • CRUD Comments on posts

🧑‍💻 Author

By Ramon Becker 👋🏽 Get in touch!

github linkedin Gmail Badge