Git Product home page Git Product logo

e-commerce_timedevsdigitalinnovation's Introduction

Microsserviços com Spring CLoud

Projeto de microsserviços com Spring Cloud desenvolvido durante o curso Microsserviços em Spring Cloud com Java, ministrado pelo professor Oswaldo Neto.

O projeto original implementado pela professora você pode encontrar clicando aqui.

Stack utilizada

  • Java 8
  • Spring Cloud
  • Spring Data
  • Redis
  • Elastisearch
  • Gradle

Minhas implementações:

  • HTTP Status
  • Lombok

Configurando Databases

Elasticseach

Baixando imagem e criando instância do Elasticsearch:

$ docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:6.6.2

Verificar a saúde do projeto startado:

$ http http://localhost:8080/actuator/health

POST:

$ http POST http://localhost:8080/product id=1 name=TV amount=10

GET by id:

$ $ http GET http://localhost:8080/product/1

Buscar todos os registros na porta do ElasticSearch:

$ http GET http://localhost:9200/product/catalog/_search/


Redis

Baixando imagem e criando instância do Redis:

$ docker run --name redis-server -d redis

Acessando Redis CLI:

$ docker run -it --link redis-server:redis --rm redis redis-cli -h redis -p 6379

Verificando saúde do projeto startado:

$ http http://localhost:8082/actuator/health

Metodos Http, testando a API conectada ao Redis:

$ http POST http://localhost:8082/cart/123 productId=1 amount=1

$ http DELETE http://localhost:8082/cart/123 productID=1

$ http GET http://localhost:8082/cart/123


Gateway

Acessando pelo Gateway o banco do Shopping-cart:

$ http://localhost:8080/cart/123

$ http://localhost:8082/cart/123

Acessando pelo Gateway o banco do Product-catalog:

$ http://localhost:8080/product/1

$ http://localhost:8081/product/1


Sequência de Boot Run dos Microsserviços:

  • config-server
  • service-discovery
  • product-catalog e/ou shopping-cart
  • gateway

e-commerce_timedevsdigitalinnovation's People

Watchers

James Cloos avatar

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.