SpringBoot生成和解析二维码完整工具类分享(提供Gitee源码)
前言:在日常的开发工作当中可能需要实现一个二维码小功能,我参考了网上很多关于SpringBoot生成二维码的教程,最终还是自己封装了一套完整生成二维码的工具类,可以支持基础的黑白二维码、带颜色的二维码、带Logo的二维码、带颜色和Logo的二维码和解析二维码五大功能,还可以生成具体的二维码文件或返回Base64,都是博主自己手写封装好的,这边免费开源给大家一键使用!只求大家一个免费的三连支持!
目录
一、问题记录
二、导入pom依赖
三、QRCodeUtil工具类完整代码
四、使用示例
五、Gitee源码
六、总结
一、问题记录
这边我使用的是zxing提供的jar包生成的二维码,不过有1个问题博客目前暂时未解决,如果有解决的方法希望可以在评论区交流一下,问题如下:
二维码的内容如果设置为中文,会报com.google.zxing.NotFoundException的错误,这个问题博主搜索了网上很多的信息也没有找到具体的解决方案。
二、导入pom依赖
<dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!-- 二维码生成器依赖 --><dependency><groupId>com.google.zxing</groupId><artifactId>core</artifactId><version>3.3.0</version></dependency><dependency><groupId>com.google.zxing</groupId><artifactId>javase</artifactId><version>3.3.0</version></dependency><!-- 常用工具类 --><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies>
三、QRCodeUtil工具类完整代码
package com.example.ewm.utils;import java.awt.BasicStroke;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Random;
import javax.imageio.ImageIO;import com.google.zxing.*;
import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
import com.google.zxing.client.j2se.MatrixToImageWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.HybridBinarizer;
import com.google.zxing.qrcode.QRCodeWriter;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;/*** @author HTT*/
@Component
public class QRCodeUtil {/*** 编码格式*/private static final String CHARSET = "utf-8";/*** 二维码后缀名*/private static final String FORMAT_NAME = "JPG";/*** 二维码尺寸*/private static final int QRCODE_SIZE = 300;/*** 插入图宽度*/private static final int WIDTH = 60;/*** 插入图高度*/private static final int HEIGHT = 60;/*** 插入图片* @param source 文件流* @param imgPath 图片路径* @param needCompress 是否压缩图片* @throws Exception*/private void insertImage(BufferedImage source, String imgPath, boolean needCompress) throws Exception {File file = new File(imgPath);if (!file.exists()) {throw new Exception(imgPath+"图片文件不存在");}Image src = ImageIO.read(new File(imgPath));int width = src.getWidth(null);int height = src.getHeight(null);// 压缩LOGOif (needCompress) {if (width > WIDTH) {width = WIDTH;}if (height > HEIGHT) {height = HEIGHT;}Image image = src.getScaledInstance(width, height, Image.SCALE_SMOOTH);BufferedImage tag = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);Graphics g = tag.getGraphics();// 绘制缩小后的图g.drawImage(image, 0, 0, null);g.dispose();src = image;}// 插入LOGOGraphics2D graph = source.createGraphics();int x = (QRCODE_SIZE - width) / 2;int y = (QRCODE_SIZE - height) / 2;graph.drawImage(src, x, y, width, height, null);Shape shape = new RoundRectangle2D.Float(x, y, width, width, 6, 6);graph.setStroke(new BasicStroke(3f));graph.draw(shape);graph.dispose();}/*** 创建带图片的二维码核心方法(如果图片路径为空,不会生成图片)* @param content 二维码内容* @param imgPath 图片路径* @param needCompress 是否压缩图片* @return* @throws Exception*/private BufferedImage createEwm(String content, String imgPath, boolean needCompress) throws Exception {Hashtable hints = new Hashtable(16);hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);hints.put(EncodeHintType.CHARACTER_SET, CHARSET);hints.put(EncodeHintType.MARGIN, 1);BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, QRCODE_SIZE, QRCODE_SIZE,hints);int width = bitMatrix.getWidth();int height = bitMatrix.getHeight();BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);for (int x = 0; x < width; x++) {for (int y = 0; y < height; y++) {image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);}}if (StringUtils.isEmpty(imgPath)) {return image;}// 插入图片insertImage(image, imgPath, needCompress);return image;}/*** 创建自定义颜色和图片的二维码核心方法(如果图片路径为空,不会生成图片)* @param content 二维码内容* @param imgPath 图片路径* @param needCompress 是否压缩图片* @param frontColor 前景色* @param backgroundColor 背景色* @return* @throws Exception*/private BufferedImage createEwm(String content, String imgPath, boolean needCompress,int frontColor,int backgroundColor) throws Exception {Hashtable hints = new Hashtable(16);hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);hints.put(EncodeHintType.CHARACTER_SET, CHARSET);hints.put(EncodeHintType.MARGIN, 1);BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, QRCODE_SIZE, QRCODE_SIZE,hints);int width = bitMatrix.getWidth();int height = bitMatrix.getHeight();BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);for (int x = 0; x < width; x++) {for (int y = 0; y < height; y++) {image.setRGB(x, y, bitMatrix.get(x, y) ? frontColor : backgroundColor);}}if (StringUtils.isEmpty(imgPath)) {return image;}// 插入图片insertImage(image, imgPath, needCompress);return image;}/*** 生成带图片的二维码保存为文件(如果图片路径为空,不会生成图片)* @param content 二维码内容* @param imgPath 图片路径* @param destPath 存放路径* @param needCompress 是否压缩图片* @throws Exception*/private void generate(String content, String imgPath, String destPath, boolean needCompress) throws Exception {BufferedImage image = createEwm(content, imgPath, needCompress);mkdirs(destPath);ImageIO.write(image, FORMAT_NAME, new File(destPath));}/*** 创建自定义颜色和图片的二维码保存为文件(如果图片路径为空,不会生成图片)* @param content 二维码内容* @param imgPath 图片路径(路径为空,则只生成基础的二维码)* @param destPath 存放路径* @param needCompress 是否压缩图片* @param frontColor 前景色* @param backgroundColor 背景色* 例举一些16进制的颜色代码* 0x000000 黑* 0xff0000 亮红* 0x00ff00 亮绿* 0xffff00 亮黄* 0x0000ff 亮蓝* 0xff00ff 亮紫* 0x00ffff 亮浅蓝* 0xffffff 白* 0xc6c6c6 亮灰* 0x848484 暗灰* @throws Exception*/private void generate(String content, String imgPath, String destPath, boolean needCompress,int frontColor,int backgroundColor) throws Exception {BufferedImage image = createEwm(content, imgPath, needCompress,frontColor,backgroundColor);mkdirs(destPath);ImageIO.write(image, FORMAT_NAME, new File(destPath));}/*** 生成带有图片的二维码并返回Base64(如果图片路径为空,不会生成图片)* @param content 二维码内容* @param imgPath 图片路径* @param needCompress 是否压缩图片* @return* @throws Exception*/private String generateBase64(String content, String imgPath, boolean needCompress) throws Exception {if (!StringUtils.isEmpty(content)) {HashMap<EncodeHintType, Comparable> hints = new HashMap<>();hints.put(EncodeHintType.CHARACTER_SET, "utf-8");hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);hints.put(EncodeHintType.MARGIN, 0);BufferedImage bufferedImage = createEwm(content, imgPath, needCompress);ByteArrayOutputStream os = new ByteArrayOutputStream();ImageIO.write(bufferedImage, FORMAT_NAME, os);String base64 = Base64.encode(os.toByteArray());os.flush();os.close();return "data:image/png;base64," + base64;}return "";}/*** 生成带有自定义颜色和图片的二维码并返回Base64(如果图片路径为空,不会生成图片)* @param content 二维码内容* @param imgPath 图片路径* @param needCompress 是否压缩图片* @param frontColor 前景色* @param backgroundColor 背景色* @return* @throws Exception*/private String generateBase64(String content, String imgPath, boolean needCompress,int frontColor,int backgroundColor) throws Exception {if (!StringUtils.isEmpty(content)) {HashMap<EncodeHintType, Comparable> hints = new HashMap<>();hints.put(EncodeHintType.CHARACTER_SET, "utf-8");hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);hints.put(EncodeHintType.MARGIN, 0);BufferedImage bufferedImage = createEwm(content, imgPath, needCompress,frontColor,backgroundColor);ByteArrayOutputStream os = new ByteArrayOutputStream();ImageIO.write(bufferedImage, FORMAT_NAME, os);String base64 = Base64.encode(os.toByteArray());os.flush();os.close();return "data:image/png;base64," + base64;}return "";}/*** 创建多级目录* @param destPath*/private void mkdirs(String destPath) {File file = new File(destPath);if (!file.exists() && !file.isDirectory()) {file.mkdirs();}}/*** 根据文件解析二维码* @param file* @return* @throws Exception*/private String analysis(File file) throws Exception {BufferedImage image;image = ImageIO.read(file);if (image == null) {return null;}BufferedImageLuminanceSource source = new BufferedImageLuminanceSource(image);BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));HashMap hints = new HashMap<DecodeHintType, Object>();hints.put(DecodeHintType.CHARACTER_SET, CHARSET);Result result = new MultiFormatReader().decode(bitmap, hints);String resultStr = result.getText();return resultStr;}/*******************************************************以下是创建二维码提供的方法封装*******************************************************//******************************另存为文件版本******************************//*** 创建基础的二维码* @param content 二维码内容* @param destPath 存放路径* @throws Exception*/public void create(String content, String destPath) throws Exception {generate(content, null, destPath, false);}/*** 创建带颜色基础的二维码* @param content 二维码内容* @param destPath 存放路径* @throws Exception*/public void create(String content, String destPath,int frontColor,int backgroundColor) throws Exception {generate(content, null, destPath, false,frontColor,backgroundColor);}/*** 创建带图片的二维码* @param content 二维码内容* @param imgPath 图片路径* @param destPath 存放路径* @param needCompress 是否压缩图片* @throws Exception*/public void create(String content, String imgPath, String destPath,boolean needCompress) throws Exception {generate(content, imgPath, destPath, needCompress);}/*** 创建带有自定义颜色和图片的二维码* @param content 二维码内容* @param imgPath 图片路径* @param destPath 存放路径* @param needCompress 是否压缩图片* @param frontColor 前景色* @param backgroundColor 背景色* @throws Exception*/public void create(String content, String imgPath, String destPath,boolean needCompress,int frontColor,int backgroundColor) throws Exception {generate(content, imgPath, destPath, needCompress,frontColor,backgroundColor);}/******************************另存为文件版本******************************//******************************Base64版本******************************//*** 创建基础的二维码并返回Base64* @param content* @throws Exception*/public String create(String content) throws Exception {return generateBase64(content,null,false);}/*** 创建带颜色基础的二维码并返回Base64* @param content* @throws Exception*/public String create(String content,int frontColor,int backgroundColor) throws Exception {return generateBase64(content,null,false,frontColor,backgroundColor);}/*** 创建带图片的二维码并返回Base64* @param content 二维码内容* @param imgPath 图片路径* @param needCompress 是否压缩图片* @throws Exception*/public String create(String content, String imgPath,boolean needCompress) throws Exception {return generateBase64(content, imgPath, needCompress);}/*** 创建带有自定义颜色和图片的二维码并返回Base64* @param content 二维码内容* @param imgPath 图片路径* @param needCompress 是否压缩图片* @param frontColor 前景色* @param backgroundColor 背景色* @throws Exception*/public String create(String content, String imgPath,boolean needCompress,int frontColor,int backgroundColor) throws Exception {return generateBase64(content, imgPath, needCompress,frontColor,backgroundColor);}/******************************Base64版本******************************//*** 根据文件路径解析二维码* @param path 文件路径* @return* @throws Exception*/public String decode(String path) throws Exception {File file = new File(path);if(!file.exists()){throw new Exception("文件不存在!");}return analysis(file);}}
四、使用示例
友情提醒:代码中的布尔值是代表Logo图片是否需要被压缩,如果是true说明嵌入的Logo图片需要被压缩,我的建议是默认为true,因为如果不压缩,在使用decode解析带Logo的二维码的时候会报com.google.zxing.NotFoundException的错误,博主亲自测试过。
单元测试:
@SpringBootTest
class EwmApplicationTests {@Resourceprivate QRCodeUtil qrCodeUtil;@Testvoid contextLoads() throws Exception {qrCodeUtil.create("httstudy","F:\\基础二维码.jpg");qrCodeUtil.create("httstudy","F:\\带颜色的二维码.jpg",0xff0000,0xffff00);qrCodeUtil.create("httstudy","F:\\Logo.png","F:\\带logo的二维码.jpg",true);qrCodeUtil.create("httstudy","F:\\Logo.png","F:\\带颜色和logo的二维码.jpg",true,0xff0000,0xffff00);String str = qrCodeUtil.create("httstudy");String str2 = qrCodeUtil.create("httstudy",0xff0000,0xffff00);String str3 = qrCodeUtil.create("httstudy","F:\\Logo.png",true);String str4 = qrCodeUtil.create("httstudy","F:\\Logo.png",true,0xff0000,0xffff00);System.out.println(str);System.out.println(str2);System.out.println(str3);System.out.println(str4);String result = qrCodeUtil.decode("F:\\基础二维码.jpg");String result2 = qrCodeUtil.decode("F:\\带颜色的二维码.jpg");String result3 = qrCodeUtil.decode("F:\\带logo的二维码.jpg");String result4 = qrCodeUtil.decode("F:\\带颜色和logo的二维码.jpg");System.out.println(result);System.out.println(result2);System.out.println(result3);System.out.println(result4);}}
运行结果:

五、Gitee源码
码云地址:SpringBoot生成二维码完整工具类分享
六、总结
良心博主原创封装不易,把常见场景需要用到的二维码类型都给大家封装好了,只要像单元测试那样一键生成就好了,如有问题,欢迎评论区留言!
相关文章:
SpringBoot生成和解析二维码完整工具类分享(提供Gitee源码)
前言:在日常的开发工作当中可能需要实现一个二维码小功能,我参考了网上很多关于SpringBoot生成二维码的教程,最终还是自己封装了一套完整生成二维码的工具类,可以支持基础的黑白二维码、带颜色的二维码、带Logo的二维码、带颜色和…...
Redis的基本知识(偏八股)
前言 本文篇概念,着重介绍Redis的执行效率、功能作用、数据类型、 执行效率 江湖上都流传这Redis的执行效率是挺快的,那为什么说它快呢?有以下几个原因: 基于内存单线程模型高效数据结构非阻塞I/O 基于内存: 内存的读写效率是…...
react使用antd的table组件,实现点击弹窗显示对应列的内容
特别提醒:不能在table的columns的render里面设置弹窗组件渲染,因为这会导致弹窗显示的始终是最后一行的内容,因为这样渲染的结果是每一行都会重新渲染一遍这个弹窗并且会给传递一个content的值,渲染到最后一行的时候,就…...
c++代码代码逻辑走查
自助生物采集代码 C部分流程...
CSS scoped 属性的原理
scoped 一、scoped 是什么?二、实现原理 一、scoped 是什么? 在 Vue 组件中,为了使样式私有化(模块化),不对全局造成污染,可以在 style 标签上添加 scoped 属性以表示它的只属于当下的模块&am…...
git 查看某个分支是从哪个分支拉出来的
原文链接:https://blog.csdn.net/allanGold/article/details/102478157 git reflog show 分支名git reflog --datelocal | grep 分支名git reflog --datelocal | grep 分支名 $ git reflog --datelocal | grep release3 5c50761 HEAD{Thu Jun 29 12:53:45 2023}: c…...
vue helloworld.vue 点击按钮弹出 dialog,并给dialog传值
1 DataAnalysisVue.Vue -->应该组件文件名和 name: 的名字一致 <template><div><el-dialog :title"dataAnalysisMsg" :visible.sync"dataAnalysisvalue" :before-close"handleClose"><span>{{ dataAnalysisMsg }}&l…...
html动态爱心代码【三】(附源码)
目录 前言 特效 内容修改 完整代码 总结 前言 七夕马上就要到了,为了帮助大家高效表白,下面再给大家带来了实用的HTML浪漫表白代码(附源码)背景音乐,可用于520,情人节,生日,表白等场景,可直…...
mmseg——报错解决:RuntimeError: CUDA error: an illegal memory access was encountered
可能解决方法汇总 GitHub issue相关汇总RuntimeError: CUDA error while trainingCUDA error: an illegal memory access was encountered记录使用mmseg时在计算交叉熵损失遇到的RuntimeError问题与解决方案...
AWS复制EC2文件到S3,g4dn.2xlarge没有NVIDIA GPU 驱动问题
1、给instances权限 action > Security > modify IAM role 把提前创建好的role给这个instance即可 2、复制到bucket aws s3 cp gogo.tar.gz s3://ee547finalbucket不需要手动安装GPU驱动 如果要自己安装,参考https://docs.aws.amazon.com/AWSEC2/latest/U…...
Go语言GIN框架安装与入门
Go语言GIN框架安装与入门 文章目录 Go语言GIN框架安装与入门1. 创建配置环境2. 配置环境3. 下载最新版本Gin4. 编写第一个接口5. 静态页面和资源文件加载6. 各种传参方式6.1 URL传参6.2 路由形式传参6.3 前端给后端传递JSON格式6.4 表单形式传参 7. 路由和路由组8. 项目代码mai…...
低代码系列——初步认识低代码
低代码系列目录 一、初步认识低代码 二、低代码是什么 三、低代码平台的概念和分类 01.无代码开发平台 02.低代码应用平台(LCAP) 03.多重体验开发平台(MXDP) 04.智能业务流程管理套件(iBPMS) 四、低代码的能力指标 五、低代码平台jnpf 表单 报表 流程 权限 一、初步认识低代码 …...
从陌生到熟练使用string类
🎈个人主页:🎈 :✨✨✨初阶牛✨✨✨ 🐻推荐专栏1: 🍔🍟🌯C语言初阶 🐻推荐专栏2: 🍔🍟🌯C语言进阶 🔑个人信条: 🌵知行合一 …...
ERP规划
ERP规划是指一个组织或企业在实施企业资源计划(ERP)系统之前,对其整体目标、需求和资源进行评估和规划的过程。以下是ERP规划的一般步骤和要点: 制定目标:明确组织对ERP系统的期望和目标,例如提高经营效率、…...
统计学作业啊啊啊啊
题目1 一个制药公司宣称其新药可以将病患的恢复时间从10天降至8天。为了验证这一声明,您从服用新药的病患中抽取了一个样本,发现样本均值为9天,样本标准差为2天,样本量为30。使用0.05的显著性水平进行假设检验,判断公…...
CAM实现的流程--基于Pytorch实现
CAM实现的流程 CAM类激活映射CAM是什么CAM与CNN CAM类激活映射 CAM是什么 可视化CNN的工具, CAM解释网络特征变化,CAM使得弱监督学习发展成为可能,可以慢慢减少对人工标注的依赖,能降低网络训练的成本。通过可视化,就…...
FL Studio2023最新版本21.1中文水果音乐编曲工具
虚拟乐器和真实乐器的区别?真实乐器指的是现实中需要乐手演奏的乐器,而虚拟乐器是计算机音乐制作中编曲师使用的数字乐器。FL Studio虚拟乐器插件有哪些?下文将给大家介绍几款FL Studio自带的强大虚拟乐器。 一、虚拟乐器和真实乐器的区别 …...
数据库概述SQL基本语法
基本概念 数据库DB database简称DB: 存储数据的仓库,是以某种结构存储数据的文件。指长期保存在计算机的存储设备上,按照一定规则阻止起来,可以被用户或应用共享的数据集合。 数据库管理系统DBMS 用于创建,维护,使…...
【面试】一文讲清组合逻辑中的竞争与冒险
竞争的定义:组合逻辑电路中,输入信号的变化传输到电路的各级逻辑门,到达的时间有先后,也就是存在时差,称为竞争。 冒险的定义:当输入信号变化时,由于存在时差,在输出端产生错误&…...
无涯教程-PHP - 性能优化
根据Zend小组的说明,以下插图显示了PHP 7与PHP 5.6和基于流行的基于PHP的应用程序上的HHVM 3.7。 Magento 1.9 与执行Magento事务的PHP 5.6相比,PHP 7的运行速度证明是其两倍。 Drupal 7 在执行Drupal事务时,与PHP 5.6相比,PHP 7的运行速度…...
树莓派超全系列教程文档--(62)使用rpicam-app通过网络流式传输视频
使用rpicam-app通过网络流式传输视频 使用 rpicam-app 通过网络流式传输视频UDPTCPRTSPlibavGStreamerRTPlibcamerasrc GStreamer 元素 文章来源: http://raspberry.dns8844.cn/documentation 原文网址 使用 rpicam-app 通过网络流式传输视频 本节介绍来自 rpica…...
Day131 | 灵神 | 回溯算法 | 子集型 子集
Day131 | 灵神 | 回溯算法 | 子集型 子集 78.子集 78. 子集 - 力扣(LeetCode) 思路: 笔者写过很多次这道题了,不想写题解了,大家看灵神讲解吧 回溯算法套路①子集型回溯【基础算法精讲 14】_哔哩哔哩_bilibili 完…...
听写流程自动化实践,轻量级教育辅助
随着智能教育工具的发展,越来越多的传统学习方式正在被数字化、自动化所优化。听写作为语文、英语等学科中重要的基础训练形式,也迎来了更高效的解决方案。 这是一款轻量但功能强大的听写辅助工具。它是基于本地词库与可选在线语音引擎构建,…...
纯 Java 项目(非 SpringBoot)集成 Mybatis-Plus 和 Mybatis-Plus-Join
纯 Java 项目(非 SpringBoot)集成 Mybatis-Plus 和 Mybatis-Plus-Join 1、依赖1.1、依赖版本1.2、pom.xml 2、代码2.1、SqlSession 构造器2.2、MybatisPlus代码生成器2.3、获取 config.yml 配置2.3.1、config.yml2.3.2、项目配置类 2.4、ftl 模板2.4.1、…...
PHP 8.5 即将发布:管道操作符、强力调试
前不久,PHP宣布了即将在 2025 年 11 月 20 日 正式发布的 PHP 8.5!作为 PHP 语言的又一次重要迭代,PHP 8.5 承诺带来一系列旨在提升代码可读性、健壮性以及开发者效率的改进。而更令人兴奋的是,借助强大的本地开发环境 ServBay&am…...
redis和redission的区别
Redis 和 Redisson 是两个密切相关但又本质不同的技术,它们扮演着完全不同的角色: Redis: 内存数据库/数据结构存储 本质: 它是一个开源的、高性能的、基于内存的 键值存储数据库。它也可以将数据持久化到磁盘。 核心功能: 提供丰…...
SpringAI实战:ChatModel智能对话全解
一、引言:Spring AI 与 Chat Model 的核心价值 🚀 在 Java 生态中集成大模型能力,Spring AI 提供了高效的解决方案 🤖。其中 Chat Model 作为核心交互组件,通过标准化接口简化了与大语言模型(LLM࿰…...
ubuntu系统文件误删(/lib/x86_64-linux-gnu/libc.so.6)修复方案 [成功解决]
报错信息:libc.so.6: cannot open shared object file: No such file or directory: #ls, ln, sudo...命令都不能用 error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory重启后报错信息&…...
沙箱虚拟化技术虚拟机容器之间的关系详解
问题 沙箱、虚拟化、容器三者分开一一介绍的话我知道他们各自都是什么东西,但是如果把三者放在一起,它们之间到底什么关系?又有什么联系呢?我不是很明白!!! 就比如说: 沙箱&#…...
VisualXML全新升级 | 新增数据库编辑功能
VisualXML是一个功能强大的网络总线设计工具,专注于简化汽车电子系统中复杂的网络数据设计操作。它支持多种主流总线网络格式的数据编辑(如DBC、LDF、ARXML、HEX等),并能够基于Excel表格的方式生成和转换多种数据库文件。由此&…...
