A RESTful API to calculate sales taxes for an item list. The items will be stored into an in-memory database. On server startup, all data structures will be created if not already present.
The API were implemented in Java 8 using Gradle for build automation and dependency management.
See API documentation for further details.
- Grizzly 2 Http Server Container, an embedded server with HK2 for dependency injection
- Jersey JSON Jackson, for JSON serialization and deserialization
- H2 Database Engine, an in-memory database
- MyBatis SQL mapper framework, a persistence framework with support for custom SQL
- Logback classic module, for logging
- Apache Commons Lang, helper utilities for the java.lang API
- JUnit testing framework, for unit tests
- AssertJ core, for fluent assertions
- Mockito core, a mocking framework for unit tests
- Random Beans core implementation, to generate random java beans for testing purpose
- Jersey Test Framework, for integration tests
- Get all stored items
- Get an item by id
- Calculate sales taxes for an item list
- Separation of persistence model, business logic, and HTTP resources layers
- RESTful HTTP response codes
- Unit tests
- Integration tests
- Java
- Gradle
- Clone GIT repository:
git clone https://github.com/liborio7/shopping.git
- CD into the project directory to build the project:
./gradlew build
- Run tests:
./gradlew test
- Run server:
./gradlew run
- Create new items
- Store created sales as the POST method suggests
- Retrieve a created sale
- Multiple currency and exchange rate on sales