HTTP API for small WMS (warehouse management system) based on Spring boot 2 Reactive WebFlux and MongoDB 4 demonstrating the use of document transactions.
- Java 8
- Docker (was tested on version 18.09.2)
The Testcontainers’ MongoDB Module and Spring Data MongoDB in Action
The application allows:
- create new products with article verification (duplicate key error collection: wms.product index: article occurs while trying to insert products with an identical id);
- find products dto(user's representation) by either name or brand (full equality, may be soften in ProductDao via clear DSL);
- find all products (entity representation);
- upload xlsx file (other formats are not currently supported) in order to update current product quantities. Matching is done by article and size. The app informs about inconsistencies between the products that are supposed to be patched and MongoDB. After uploading, files are kept in a storage.bulk-upload-path/userName folder and then removed when the next call is performed.
- download product in xlsx format is not currently supported.
- The project ought to be built by means of Gradle. For that reason, run
gradlew clean build
. Subsequently, to start the application make use ofgradlew bootRun
- All the examples of possible requests might be found in
integration
package including tests in accordance with basic commands. These classes use a bunch of predefined files located intest\resources
. - The app provides BasicAuth with predefined 2 users admin and user, see more in SecurityConfig.java.
- Recon the use of Spring Security Oath2.
- Draw attention to the limitation of user space on the server. Frankly speaking, server space is a limited resource.
Copyright (c) 2020 Konstantin Silaev silaev256@gmail.com