Giter Site home page Giter Site logo

spring-api-crud's Introduction

Spring Boot, JPA, API Rest

Crud usando Spring

Pré-requisitos

  • Java JDK 17 ou superior
  • Apache Maven

Rodando o projeto

1. Clone o projeto

git clone https://github.com/wander740/spring-api-crud.git

2. Compila as classes

mvn compile

3. Execute o aplicativo usando o maven

mvn spring-boot:run

O aplicativo será executado no http://localhost:8080

Usando a API Rest

News

Method Url Description Sample Valid Request Body
GET /api/news Obtenha todas as postagens
GET /api/news/{id} Obter postagem por ID
GET /api/news/searchByName Procura as postagem por uma string
POST /api/news Criar nova postagem JSON
PUT /api/news/{id} Atualizar postagem JSON
DELETE /api/news/{id} Excluir postagem

Category

Method Url Description Sample Valid Request Body
GET /api/category Obtenha todas as categorias
GET /api/category/{id} Obter categoria por ID
POST /api/category Criar nova categoria JSON

JSON válidos

{
	"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
	"text": "quia et suscipit suscipit recusandae consequuntur expedita et cum reprehenderit molestiae ut ut quas totam nostrum rerum est autem sunt rem eveniet architecto",
	"category_id": 1
}
{
	"title": "UPDATED UPDATED UPDATED UPDATED UPDATED UPDATED",
	"text": "UPDATED UPDATED UPDATED UPDATED UPDATED UPDATED UPDATED UPDATED UPDATED UPDATED",
	"category_id": 1
}
{
	"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit"
}

spring-api-crud's People

Contributors

wander740 avatar

Watchers

 avatar

Forkers

wandersonrs740

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.