Code Monkey home page Code Monkey logo

workshop-sb-product-microservice's Introduction

workshop-sb-product-microservice

SpringBoot Products Microservices Continuum Workshop

Comandos gradle

Comando Descripción
./gradlew bootrun -x test Ejecuta la aplicación, sin ejecutar los tests
./gradlew bootjar -x test Crea el jar de la aplicacion, sin ejecutar los tests
./gradlew test Ejecuta los tests
./gradlew clean Limpia el proyecto de clases y recursos auto-generados

Ejecutar aplicacion producción

compilar y crear JAR

./gradlew bootjar -x test

ejecutar el JAR

java -jar build/libs/workshop-sb-product-microservice-0.0.1.jar

obtener todos los productos

curl http://localhost:8080/api/v1/products

status:
    200: [] // Array de productos
    404: Not Found

obtener los productos por criterio name

curl http://localhost:8080/api/v1/products?name=switch
curl http://localhost:8080/api/v1/products?name=lite
curl http://localhost:8080/api/v1/products?name=xbox

status:
    200: [] // Array de productos
    404: Not Found

crear un producto

curl -X POST http://localhost:8080/api/v1/products -H "Content-Type: application/json" -d '{"name": "ps4", "price": 0}'
curl -X POST http://localhost:8080/api/v1/products -H "Content-Type: application/json" -d '{"name": "ps4", "price": 300000}'

status:
    201: Created //retorna el producto creado
    400: Bad Request //retorna error de parametros
    500: Server Error

obtener un producto por id

curl http://localhost:8080/api/v1/products/0
curl http://localhost:8080/api/v1/products/1

status:
    200: {} // Producto
    404: Not Found

workshop-sb-product-microservice's People

Contributors

goncafa avatar vutreras avatar luelher avatar

Watchers

 avatar  avatar James Cloos avatar Pedro avatar Eugenio Nicolás López Ramos avatar

Forkers

afiebig

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.