Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rapter1990/qr-generator-example

QR Generator Example with Spring Boot
https://github.com/rapter1990/qr-generator-example

docker docker-compose integration-test java junit qrcode qrcode-generator restful-api spring-boot validation zxing zxing-qrcode

Last synced: about 3 hours ago
JSON representation

QR Generator Example with Spring Boot

Awesome Lists containing this project

README

        

# 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;

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

---
### Maven Run
To build and run the application with `Maven`, please follow the directions shown below;

```sh
$ 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