Rapter1990 / qr-generator-example

QR Generator Example with Spring Boot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Boot QR Generator Example

Main Information

đź“– Information

  • The application receives the requested information to generate QR code containing text message, color, background color and size with file upload option or not through through `/api/v1/qr-generator`
  • The QR code is generated through validations defined below
    • color validation to check whether color is defined as hex color code
    • text length validation to check whether text is ranged between two defined length size (1-50)
    • Size validation to check whether if the size should be defined as small, medium and lastly large

Explore Rest APIs

Method Url Description Valid Request Params
POST /api/v1/qr-generator Qr Code Generator with Image Info
POST /api/v1/qr-generator Qr Code Generator without Image Info

Valid Request Body

Qr Code Generator with Image
    http://localhost:8080/api/v1/qr-generator
    
    form-data
    text : Merhaba
    size : small
    color : #0046FF
    backgroundColor : #64FF00
    imageFile : File Upload

Main Information

Qr Code Generator without Image
    http://localhost:8080/api/v1/qr-generator
    
    form-data
    text : Merhaba
    size : small
    color : #0046FF
    backgroundColor : #64FF00

Main Information

Technologies


  • Java 17
  • Spring Boot 3.0
  • Open API Documentation
  • Restful API
  • Spring Boot Validation
  • Google Zxing Core
  • Google Zxing Java Standart Edition (SE)
  • Lombok
  • Maven
  • Junit5
  • Mockito
  • Integration Tests
  • Docker
  • Docker Compose

Prerequisites


  • Maven or Docker

Docker Run

The application can be built and run by the Docker engine. The Dockerfile has multistage build, so you do not need to build and run separately.

Please follow directions shown below in order to build and run the application with Docker Compose file;

$ cd qr-generator-example
$ docker-compose up -d

Maven Run

To build and run the application with Maven, please follow the directions shown below;

$ cd qr-generator-example
$ mvn clean install
$ mvn spring-boot:run

Swagger

You can reach the swagger-ui through the link shown below

    http://localhost:8080/swagger-ui/index.html

Screenshots

Click here to show the screenshots of project

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

About

QR Generator Example with Spring Boot


Languages

Language:Java 99.1%Language:Dockerfile 0.9%