项目作者: scbushan05

项目描述 :
Book API demonstrates the RESTful web services using Spring MVC. Book API performs all the CRUD operations. User can create a book, read a single book, update a book and delete a book. To communicate with database we will use Hibernate which is our ORM framework and MySQL is the database to store the records.
高级语言: Java
项目地址: git://github.com/scbushan05/book-api.git
创建时间: 2018-07-23T05:47:01Z
项目社区:https://github.com/scbushan05/book-api

开源协议:

下载


BOOK API - Spring MVC, MySQL, Hibernate Rest API Tutorial

Build Restful CRUD API for a simple Book-Manage application using Spring MVC, Mysql and Hibernate.

Requirements

  1. Java - 1.8.x

  2. Maven - 3.3.9

  3. MySQL - 5.7.12

Steps to Setup

1. Clone the application

  1. git clone https://github.com/scbushan05/book-api.git

2. Create Mysql database

  1. create database bookdb

3. Change mysql username and password as per your installation

  • open src/main/resources/db.properties

  • change mysql.user and mysql.password as per your mysql installation

4. Build and run the app using maven

  1. mvn package

A new WAR file will be generated at project/target/bookapi-0.0.1-SNAPSHOT.war, just copy and deploy to your Tomcat.

The app will start running at http://localhost:8080/bookapi.

Explore Rest APIs

The app defines following CRUD APIs.

  1. GET /api/book
  2. POST /api/book
  3. GET /api/book/{bookId}
  4. PUT /api/book/{bookId}
  5. DELETE /api/book/{bookId}

You can test them using postman or any other rest client.

Learn more

You can find the tutorial for this application on my blog -

http://bushansirgur.in/angular-2-and-spring-mvc-simple-crud-application