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.
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/
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.
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/
- Java
- JPA
- Spring Boot
- MongoDB
- MongoDBCompass
- CRUD User
- CRUD Post
- CRUD Comments on posts
By Ramon Becker 👋🏽 Get in touch!