qrcode/src/main/java/com/xiongyingqi/qrcode/QRCode.java
public String decode(String path) throws IOException, NotFoundException {
        if (path == null || path.equals("")) {
            System.out.println("文件路径不能为空!");
        }
        File file = new File(path);
        BufferedImage image = ImageIO.read(file);
            /*判断是否是图片*/
        if (image != null) {
            return decode(image);
        }
        return null;
    }
public String decode(String path) throws IOException, NotFoundException {
        if (path == null || path.equals("")) {
            System.out.println("文件路径不能为空!");
        }
        File file = new File(path);
        BufferedImage image = ImageIO.read(file);
            /*判断是否是图片*/
        if (image != null) {
            return decode(image);
        }
        return null;
    }
解析二维码

@param path 图片的绝对路径