Git Product home page Git Product logo

book-server's Introduction

Book Store REST API

This project demonstrates following:

  • spring boot rest controller
  • REST methods for CRUD operations
  • spring data jpa
  • swagger UI docs
  • modelmapper
  • mockito testing framework
  • separation of client views from ORM objects for extensible API design
  • javax validation constraints

Running the application

mvn spring-boot:run

Swagger UI docs

http://localhost:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config#/

default swagger reference

http://localhost:8080/swagger-ui/index.html

Get all books

GET http://localhost:8080/api/v1/books/

Get one books

GET http://localhost:8080/api/v1/books/2

Add a book

POST http://localhost:8080/api/v1/books/ Content-Type: application/json

{ "id": 4, "title": "book4", "author": "author4" }

Delete a book

DELETE http://localhost:8080/api/v1/books/3

Replace a Book

PUT http://localhost:8080/api/v1/books/2 Content-Type: application/json

{ "id": 2, "title": "book22", "author": "author2" }

Update part of a Book

PATCH http://localhost:8080/api/v1/books/2 Content-Type: application/json

{ "title": "book223" , "author": "author2" }

GET /api/books/published find all published books

GET /api/books?title=[keyword] find all books which title contains keyword

book-server's People

Contributors

rajeshsl avatar javaninja1 avatar

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.