The aim of this project is to provide an easily deployable service for the rendering different types of barcodes. The idea for such a thin wrapper service for barcode libraries was based on a Baeldung tutorial available here.
The current service supports the following barcode types:
-
EAN 8
-
EAN 13
-
QR Codes
-
UPC A
-
UPC E
-
Clone the repository
git clone https://github.com/kocmana/barcode-service.git
-
Compile and package the application into a docker image
-
To add the image to a local docker daemon use
mvn clean compile jib:dockerBuild
-
To add the image to a remote repository use
mvn clean jib:build -Dimage=DestinationOfYourImage
-
-
Run the docker image either locally or deploy
In case that barcode generation is only required for a subset of the offered barcodes, packages containing not required barcodes can be deleted prior to deployment without affecting any other barcode generation functionality.
If e.g. only QR code generation is required, the ean
package can be deleted altogether before compilation of the service as described above.
Currently, the project is set to use Caffeine as the technical basis for caching. If cross-instance caching is required for multiple deployed instances of the service, this can easily be done by configuring alternative solutions like Redis in the application-docker.yml
(for additional information see here.
Security of the exposed endpoints is not considered part of the responsibilities of this application, since the actual requirements may differ widely depending on the actual deployment environment and service landscape.
If auth is not handled by the service mesh or by using any external solution, Spring Security can be added easily and configured to the specific requirements.
|
If no additional precautions are taken, all endpoints are publicly available if deployed as is. |