Rest based Inventory Management System build on Spring Framework
Rest based Inventory Management System build on Spring Boot Framework
git clone --recursive https://github.com/NeebalLearningPvtLtd/InventoryManagementSystem.git
python3 init.py
Note : Views are not done yet .
http://domain/controller_mapping/get/all?page=0&size=50
it fetches first 50 rows from first slot , for next slot page=1 and so-on
Note size can be varied
Complete controller code for say Model Laptop can be found here which contains all the Request mappings for GET , POST , PUT ,DELETE is done .
Exception handling of Api is done using @RestControllerAdvice annotation , code can be found here
Hibernate framework was used for DAO layer and was implemented using JPA standards as well as spring data JPA .
JPA's EntityManager way used in GenericRepo , LaptopRepo , AdapterRepo
Spring Data Jpa was used in LaptopUsedByRepo , AdapterUsedByRepo
Inventory is abstract class for all the inventories .
Testing was done using Junit 4 and @SpringBootTest annotation provided by spring boot
Note : H2 Inmemory Db was used during testing , but some queries were incompatible with H2 that runs with no problem in MySql/MariaDb
see pom.xml
Excel-to-POJO was used for maping excel data to POJO's found in models package