This project have as goal exporse uma api where one type of backend can mantain them products and expose for others API.
Example
- one Bar can list all producsts using this api 2 one employ can mantain the produduct list (insert, update , delete)
- main features: list products existents and mantain products
-
Up mongodb container:
docker-compose -f devops/docker-compose.yml up --build -d
-
Start springboot application with gradle and generate jar
./gradlew clean build bootRun
or Start with jarjava -jar build/libs/products-api-0.0.1-SNAPSHOT.jar
-
Create a new user ( dont neeed permition)
PUT http://localhost:8080/user-application/mannager/new-user
{ "name": "Administration", "username": "root", "password": "root", "admin" : true }
- Swagger - API Documentation
http://localhost:8080/swagger-ui.html
use one user and password created
- For HTTP Requisitions use follow credentials ( if executed the postman new-user)
user: root
password: root
- You can use postman collection attached for examples.
import in your postman -> http://localhost:8080/v2/api-docs
http://localhost:8081/
docker-compose -f devops/docker-compose.yml down
- Import gradle project in your intellij for exemple
- You will need lombok plugin
- protected - for users with role user
- admin - for users with role admin