This commit is contained in:
parent
878751f8ef
commit
8ab93e1573
|
@ -1,10 +1,20 @@
|
|||
package com.baeldung.barcodes;
|
||||
|
||||
import com.baeldung.barcodes.generators.*;
|
||||
import com.baeldung.barcodes.generators.BarbecueBarcodeGenerator;
|
||||
import com.baeldung.barcodes.generators.Barcode4jBarcodeGenerator;
|
||||
import com.baeldung.barcodes.generators.QRGenBarcodeGenerator;
|
||||
import com.baeldung.barcodes.generators.ZxingBarcodeGenerator;
|
||||
import com.baeldung.barcodes.generators.ZxingBarcodeGeneratorWithText;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
|
|
|
@ -5,11 +5,12 @@ import com.google.zxing.WriterException;
|
|||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Color;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
public class ZxingBarcodeGeneratorWithText {
|
||||
|
||||
public static BufferedImage createQRwithText(String data, String name, String info) throws WriterException, IOException {
|
||||
|
|
Loading…
Reference in New Issue