A POS RESTful API built with Spring Framework, handling Customer, Item, Order, and OrderDetail management. It supports CRUD operations and transaction management, using Hibernate for ORM and JPA for repository handling.
- Java 17
- Spring Framework
- Hibernate ORM
- Spring Data JPA
- ModelMapper
- Logback
- MySQL
- Customer Management (Create, Read, Update, Delete)
- Item Management (Create, Read, Update, Delete)
- Order and Transaction Processing
- Exception Handling and Validation using Hibernate Validator
- JSON Response formatting
Validation is implemented using Hibernate Validator annotations in the DTO classes to ensure data integrity and correctness.
Logging is configured using Logback. Logs are written to both the console and a file.
For detailed API documentation and testing, please refer to the Postman API Documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
To run this project, ensure you have the following installed:
- Java Development Kit (JDK) 17 or higher
- Apache Tomcat (10.1.24)
- MySQL
- Maven
- Clone the repository:
git clone https://github.com/yasith-chathuranga/posfusion-pos-spring-api.git
- Update the MySQL database configuration in
WebAppRootConfig.java
:@Bean public DataSource dataSource() { DriverManagerDataSource dmds = new DriverManagerDataSource(); dmds.setDriverClassName("com.mysql.cj.jdbc.Driver"); dmds.setUrl("jdbc:mysql://localhost:3306/posfusion?createDatabaseIfNotExist=true"); dmds.setUsername("root"); dmds.setPassword("your_password"); return dmds; }
© 2024 Yasith Chathuranga