Skip to content
Piyush Chaudhari edited this page Mar 22, 2020 · 26 revisions

How to implement spring boot micro service. Pleases follow below step to implements.

  1. Create Notification Service

  2. Create Account Create Service

  3. Create Create Eureka Server

  4. Register account create service to eureka server

  5. Register notification service to eureka server

  6. Create zuul gateway

  7. Call notification service from account create service

  8. Run Eureka Server http://localhost:8761

  9. Run Account Create Service with multiple instance as below:
    java -jar -Dserver.port=8080 account-create-service-0.0.1-SNAPSHOT.jar
    java -jar -Dserver.port=8081 account-create-service-0.0.1-SNAPSHOT.jar

  10. Run Notification Service with multiple instance as below:
    java -jar -Dserver.port=8082 notification-service-0.0.1-SNAPSHOT.jar
    java -jar -Dserver.port=8083 notification-service-0.0.1-SNAPSHOT.jar

  11. Run zuul gateway http://Dynamic IP ADDRESS:8762

  12. Check Account Create Service,Notification Service, zuul gateway are registered with Eureka Server or not.

  13. Call user registration api via zuul gateway URL: http://Dynamic IP ADDRESS:8762/registration/user/createAccount
    Method: POST
    Content-Type: application/json
    Body: { "firstName":"Piyush", "lastName":"Chaudhari", "email":"[email protected]", "password":"XXX", "age":25 }

Top