Coder Social home page Coder Social logo

nurikpyn / microservices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eezkren/microservices

0.0 0.0 0.0 130 KB

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

Home Page: https://dreamix.eu/blog/java/building-microservices-with-netflix-oss-apache-kafka-and-spring-boot

Java 100.00%

microservices's Introduction

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]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.