The design has been explained in following ppt -
- Clone it to local - git clone https://github.com/greenlearner01/Microservices.git and
- Navigate to userManagementApp folder
- Now there are two ways to run the project
- First- running jar file
-
navigate to directory from command prompt
-
execute below command
gradlew clean build
this will create the jar file inside build/libs
-
go to /build/libs and execute > java -jar .jar
-
- Sencond way - Directly running the main method
- Open the project in IntelliJ Idea or eclipse
- And run the main method inside UserManagementAppApplication.java
- First- running jar file
- The app will run on port 8082
-
AddUser - Post method > http://localhost:8082/user
Request body - { "id": "1234", "name": "green learner123", "address": "delhi", "addresses": [ { "line1": "noida", "line2": "u.p.", "pinCode": "223422" } ], }
-
update user - Put method > http://localhost:8082/user
Request body - { "id": "1234", "name": "green learner123-updated", "address": "delhi-updated", "addresses": [ { "line1": "noida", "line2": "u.p.", "pinCode": "223422" } ], }
-
Get single user - GET method > http://localhost:8082/user/123
-
Get all the users - GET method > http://localhost:8082/users
-
Delete user - DELETE method > http://localhost:8082/user/123