Rest based Inventory Management System build on Spring Boot Framework
- Clone the Repository
git clone --recursive https://github.com/NeebalLearningPvtLtd/InventoryManagementSystem.git- Import in eclipse
File > import > General > Projects from Folder or Archive - Init DB Schema
- locate init.py in src/main/resources/database_files/
- run init.py
python3 init.py
- This is the code to create an Inventory management automated system for Kossine's physical classrooms .
- Design pattern used is M
VC of spring boot's starter web .
Note : Views are not done yet .
- Controller's can be found here , paging support is also added can be accessed using
http://domain/controller_mapping/get/all?page=0&size=50it 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 ,DELETEis done .Exception handling of Api is done using
@RestControllerAdviceannotation , code can be found hereHibernate 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
@SpringBootTestannotation 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