Code Monkey home page Code Monkey logo

springboot-kafka-docker's Introduction

Tutorial Springboot com Kafka

Tutorial do curso Arquitetura Orientada a Eventos com Java, Spring Boot e Kafka da Digital Innovation One Inc.

https://github.com/expertos-tech/dio-tutorial-kafka

Kafka

docker-compose up -d

Kafdrop

http://localhost:19000/

Subir API

cd tutorial-rest-kafka
mvn spring-boot:run

Subir Microsserviço

cd tutorial-microsservico-kafka
mvn spring-boot:run

Teste

Postman

Curl

curl --location --request POST 'http://localhost:8080/api/salva-pedido' \
--header 'Content-Type: application/json' \
--data-raw '{
 	"codigo":"0001",
    "nomeProduto":"MOTOR-X",
    "valor": 10000,
    "data":"2022-08-17 14:00:00"
}'

Javascript

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({"codigo":"001","nomeProduto":"MOTOR-X","valor":10000,"data":"2022-08-17 14:00:00"});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("http://localhost:8080/api/salva-pedido", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Aviso

Este repositório está sob licença MIT.

Contato

Lyndon Tavares ([email protected])

springboot-kafka-docker's People

Contributors

lyndontavares avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

krishnamurtyp

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.