Simple CRUD apprication. You can:
- Perform CRUD-operation on books and people.
- Search book by title.
- Use book pagination by sending
page_number + books_per_page
parameters.- Sort books by passing
sort_per_year
parameters
Database | |
---|---|
Backend | |
View Template | |
Build Tool | |
Server |
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
-
Deploy war arifact
-
Start project using Tomcat
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 |
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 |