Giter Site home page Giter Site logo

spring-rest-example's Introduction

spring-rest-example

Este projeto é um CRUD simples usando as seguintes tecnologia:

  • Spring boot
  • Spring mvc
  • Spring Rest
  • Spring jpa
  • MySql
  • Lombok

Pré-requisitos

  1. Ter instalado o MySql na porta 3306
  2. Criar um banco de dados com o nome restdb
  3. Ter instalado o Maven

Instalação do projeto

  1. Clonar o repositório: git clone https://github.com/silva-wellington/spring-rest-example
  2. Entrar na pasta do projeto: cd spring-rest-example
  3. Executar o projeto: mvn spring-boot:run

Features:

  1. GET http://localhost:8088/api/tarefas Buscar todas as tarefas.

    • Retorna o código 200 e uma lista de Tarefas.
  2. POST http://localhost:8088/api/tarefas Salvar uma tarefa nova.

    • Envia um json com uma Tarefa:
    {
    	"nome": "Tarefa 1"
    }
    
    • Retorna o código 200 em caso de sucesso e o objeto json persistido.
  3. PUT http://localhost:8088/api/tarefas/{ID} Alterar uma tarefa.

    • Envia um json com uma Tarefa no body e o Id da Tarefa que será alterada no Path:
    {
    	"nome": "Tarefa 1"
    }
    
    • Retorna o código 200 em caso de sucesso e o objeto json persistido.
  4. DELET http://localhost:8088/api/tarefas/{ID} Excluir uma tarefa.

    • Envia Id da Tarefa que será deletada no Path.
    • Retorna o código 200 em caso de sucesso.

spring-rest-example's People

Contributors

waraujodev avatar

Watchers

 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.