Skip to content

Encerel/SpringMiniLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚Mini library

Description

Simple CRUD apprication. You can:

  1. Perform CRUD-operation on books and people.
  2. Search book by title.
  3. Use book pagination by sending page_number + books_per_page parameters.
  4. Sort books by passing sort_per_year parameters

Technologies

Database Postgresql
Backend Java Spring
View Template Jsp
Build Tool Maven
Server Tomcat

⚙️ Getting Started

🔨 Local startup with Maven

Java version 17+ is required.

  • Clone the repository
git clone https://github.com/Encerel/SpringMiniLibrary.git
  • Import Database dump from

SpringMiniLibrary/src/main/resources/databasemigration/

  • Set up environment variables in

SpringMiniLibrary/src/main/resources/hibernate.properties.origin

  • Download Apache Tomcat 10.* version

https://tomcat.apache.org/download-90.cgi

  • Deploy war arifact

  • Start project using Tomcat


💠 Endpoints

👦Person

HTTP METHOD URL QUERY PARAMETERS DESCRIPTION
GET /people none Getting all Persons
GET /people/{id} none Getting person by id
GET /people/new none Redirect to the page with a creation of a person
GET /people/{id}/edit none Redirect to the page with edditing a person
POST /people none Create a new person
PATCH /people/{id} none Update person information
DELETE /person/{id} none Delete person by id

📔 Book

HTTP METHOD URL QUERY PARAMETERS DESCRIPTION
GET /books none Getting all books
GET /books sort_per_year not required Getting all books sorted by year
GET /books page_number + books_per_page not required Books are displayed with pagination
GET /books page_number + books_per_page + sort_per_year not required Books are displayed with pagination and sorted by year
GET /books/{id} none Getting book by id
GET /books/new none Redirect to the page with a creation of a book
GET /books/{id}/edit none Redirect to the page with edditing a book
GET /books/search none Redirect to page with search field
GET /books/search query not required Getting all books name starting with query
POST /books none Create a new book
PATCH /book/{id} none Update book information
PATCH /book/{id}/assign none Assign the book to person
PATCH /book/{id}/release none Release the book from person
DELETE /book/{id} none Delete book by id

📟 Demo

👩 Person

All people page

Person profile

Without any books

With several books

Person edit profile

Person create

📗 Book

All books page

Book profile

Assigned book

🔎 Search and Pagination 📑

Book search

Sorted by year

Pagination (3 books per page)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published