[Solved] qrcode-error: Exception in thread “main” java.lang.NoClassDefFoundError…

qrcode-error

Project scenario:

QR code generation

Problem description

Hint: Here we describe the problems encountered in the project:

For example, in the process of data transmission, data is lost from time to time, and some data is occasionally lost
The code of data received in the APP:

QrConfig qrConfig = QrConfig.create(); 
qrConfig.setWidth(500);
qrConfig.setHeight(500); 
String encode = Base64.encode(QrCodeUtil.generatePng("loginQRVerify:",qrConfig));


Cause analysis:

Prompt: jar package is missing


Solution:

<!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
<dependency>
    <groupId>com.google.zxing</groupId>
    <artifactId>core</artifactId>
    <version>3.3.0</version>
</dependency>

Read More: