Foreword:
Requirement description: The user knows the link address, but does not want to click on the link, and wants to access the designated website by scanning the code; then the user only gives me a url address and let me generate a QR code for him!
Understanding of Zxing:
ZXing, a library that supports decoding and generating barcodes (such as QR codes, PDF 417, EAN, UPC, Aztec, Data Matrix, Codabar) in images. ZXing ("zebra crossing") is an open source, multi-format, 1D/2D barcode image processing library implemented in Java, with ports to other languages.
First look at the implementation effect:
Code implementation process:
1. Introduce Google's zxing dependency
<!--引入生成二维码的依赖-->
<!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
<dependency>