Skip to content

gtiwari2015/microservices

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisite

  • Java 1.8
  • Kafka

Service registry (Eureka)

Config server (Spring Cloud Config)

  • native profile is active reading propertes from local folder
  • Update properties
    • SET PATH_TO_MICROSERVICES_PROJECT in /microservices/ms-config-server/src/main/resources/application.yml
    • SET YOUR_GMAIL_USERNAME in /microservices/ms-config-properties/ms-mail/dev/ms-mail.yml
    • SET YOUR_GMAIL_PASSWORD in /microservices/ms-config-properties/ms-mail/dev/ms-mail.yml
  • Run
    • mvn clean install
    • java -jar target/ms-config-server-0.0.1-SNAPSHOT.jar
  • Check
    • http://localhost:8888/ms-user/dev -- expect {"name":"ms-user","profiles":["dev"],"label":null,"version":null,"state":null,"propertySources":[{"name":"file:///home/isilona/git/personal/microservices/ms-config-properties/ms-user/dev/ms-user.yml","source":{"spring.h2.console.enabled":true,"spring.h2.console.path":"/h2-console","spring.datasource.url":"jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE","spring.datasource.username":"sa","spring.datasource.password":"","spring.kafka.bootstrap-servers":"localhost:9092","spring.kafka.topic.userCreated":"USER_CREATED_TOPIC","security.basic.enabled":false}}]}

User service

  • Run
    • mvn clean install
    • java -jar target/ms-user-0.0.1-SNAPSHOT.jar
  • Check
    • localhost:8081/api/user/members -- expect 0 records returned

Email service

  • Run
    • mvn clean install
    • java -jar target/ms-mail-0.0.1-SNAPSHOT.jar
  • Check

Gateway (Zuul)

  • Run
    • mvn clean install
    • java -jar target/ms-gateway-0.0.1-SNAPSHOT.jar
  • Check
    • POST: localhost:8765/api/user/register { "username": "[email protected]", "password": "pass" }
    • GET: localhost:8765/api/user/members -- expect 1 record returned
    • Check email receive at [email protected]

About

Code base for my "Building Microservices with Netflix OSS, Apache Kafka and Spring Boot blog"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 44.4%
  • Batchfile 34.3%
  • Java 21.3%