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的运行速度…...

【HarmonyOS 5.0】DevEco Testing:鸿蒙应用质量保障的终极武器
——全方位测试解决方案与代码实战 一、工具定位与核心能力 DevEco Testing是HarmonyOS官方推出的一体化测试平台,覆盖应用全生命周期测试需求,主要提供五大核心能力: 测试类型检测目标关键指标功能体验基…...
mongodb源码分析session执行handleRequest命令find过程
mongo/transport/service_state_machine.cpp已经分析startSession创建ASIOSession过程,并且验证connection是否超过限制ASIOSession和connection是循环接受客户端命令,把数据流转换成Message,状态转变流程是:State::Created 》 St…...
今日科技热点速览
🔥 今日科技热点速览 🎮 任天堂Switch 2 正式发售 任天堂新一代游戏主机 Switch 2 今日正式上线发售,主打更强图形性能与沉浸式体验,支持多模态交互,受到全球玩家热捧 。 🤖 人工智能持续突破 DeepSeek-R1&…...
聊一聊接口测试的意义有哪些?
目录 一、隔离性 & 早期测试 二、保障系统集成质量 三、验证业务逻辑的核心层 四、提升测试效率与覆盖度 五、系统稳定性的守护者 六、驱动团队协作与契约管理 七、性能与扩展性的前置评估 八、持续交付的核心支撑 接口测试的意义可以从四个维度展开,首…...

【Linux】Linux 系统默认的目录及作用说明
博主介绍:✌全网粉丝23W,CSDN博客专家、Java领域优质创作者,掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域✌ 技术范围:SpringBoot、SpringCloud、Vue、SSM、HTML、Nodejs、Python、MySQL、PostgreSQL、大数据、物…...

【免费数据】2005-2019年我国272个地级市的旅游竞争力多指标数据(33个指标)
旅游业是一个城市的重要产业构成。旅游竞争力是一个城市竞争力的重要构成部分。一个城市的旅游竞争力反映了其在旅游市场竞争中的比较优势。 今日我们分享的是2005-2019年我国272个地级市的旅游竞争力多指标数据!该数据集源自2025年4月发表于《地理学报》的论文成果…...

边缘计算网关提升水产养殖尾水处理的远程运维效率
一、项目背景 随着水产养殖行业的快速发展,养殖尾水的处理成为了一个亟待解决的环保问题。传统的尾水处理方式不仅效率低下,而且难以实现精准监控和管理。为了提升尾水处理的效果和效率,同时降低人力成本,某大型水产养殖企业决定…...
十二、【ESP32全栈开发指南: IDF开发环境下cJSON使用】
一、JSON简介 JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,具有以下核心特性: 完全独立于编程语言的文本格式易于人阅读和编写易于机器解析和生成基于ECMAScript标准子集 1.1 JSON语法规则 {"name"…...

简单聊下阿里云DNS劫持事件
阿里云域名被DNS劫持事件 事件总结 根据ICANN规则,域名注册商(Verisign)认定aliyuncs.com域名下的部分网站被用于非法活动(如传播恶意软件);顶级域名DNS服务器将aliyuncs.com域名的DNS记录统一解析到shado…...

安宝特案例丨寻医不再长途跋涉?Vuzix再次以AR技术智能驱动远程医疗
加拿大领先科技公司TeleVU基于Vuzix智能眼镜打造远程医疗生态系统,彻底革新患者护理模式。 安宝特合作伙伴TeleVU成立30余年,沉淀医疗技术、计算机科学与人工智能经验,聚焦医疗保健领域,提供AR、AI、IoT解决方案。 该方案使医疗…...