当前位置: 首页 > news >正文

【微服务】组件、基础工程构建(day2)

组件

服务注册和发现

微服务模块中,一般是以集群的方式进行部署的,如果我们调用的时候以硬编码的方式,那么当服务出现问题、服务扩缩容等就需要对代码进行修改,这是非常不好的。所以微服务模块中就出现了服务注册和发现组件,比较常用的组件有Eureka、Consul、Nacos,在微服务系列中,也是针对这三个组件来进行介绍。

负载均衡

由于以集群的方式部署,因此我们就要考虑调用哪台机子的问题,所以微服务模块中又出现了负载均衡组件, 在微服务系列中,针对LoadBalancer组件进行介绍。

分布式配置管理

微服务导致会出现大量的服务,而每个服务都需要必要的配置,此时就迫切需要一套集中式的、动态的配置管理设施,在微服务系列中,针对Consul、Nacos组件进行介绍。

网关

微服务的出现导致大量的服务,从而导致大量的IP地址,这对前端是不友好的。但是,本着脏话累活后端来干的优良品质,因此又出现了一系列的组件来解决这个问题,在微服务系列中,针对Gateway组件进行介绍。

服务调用

单体项目中,想要调用别的业务只需要注入即可,但是在微服务中,业务进行拆分,因此无法通过注入的方式来进行调用。不过,例如RestTemplate、HttpClient等都是可以进行URL发送的,但是这种方式也会造成硬编码的出现。于是,微服务又出现了一系列组件来解决这个问题, 在微服务系列中,针对OpenFeign组件进行介绍。

服务链路追踪

微服务应用中,可能一个业务的完成就需要调用N个服务,如果该业务效率低下、响应结果错误。我们就需要去定位是哪里的响应慢、哪里的服务出现错误,但是靠肉眼是没法看出来的。因此,微服务又出现了组件,来对一次调用的链路进行记录,从而可以在出现问题后快速解决问题。 在微服务系列中,针对Micrometer Tracing组件进行介绍。

服务熔断和降级

微服务的出现本来就是为了解决单体项目资源不足的情况,因此当流量过多或者服务出错时,我们就要采取降低流量等措施,对于这种问题, 在微服务系列中,针对Circuit Breaker和Sentinel组件进行介绍。

分布式事务

单体应用中我们经常要用到事务,微服务应用也不例外,因此对于这种应用场景。 在微服务系列中,针对Seata组件进行介绍。

在微服务系列中,基本上就是对上述组件的介绍,不会涉及太多的底层原因,主要是介绍如何进行操作,后续有实力之后再对其源码进行分析介绍。

基础工程构建

业务场景

以订单服务调用商品服务为例,来对SpringCloud的一系列组件进行介绍。

数据准备

-- 建库,商品库
create database if not exists cloud_product charset utf8mb4;
-- 使用库
use cloud_product;
-- 产品表
DROP TABLE IF EXISTS product_detail;
CREATE TABLE product_detail (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '产品id',
`product_name` varchar ( 128 ) NULL COMMENT '产品名称',
`product_price` BIGINT ( 20 ) NOT NULL COMMENT '产品价格',
`state` TINYINT ( 4 ) NULL DEFAULT 0 COMMENT '产品状态 0-有效 1-下架',
`create_time` DATETIME DEFAULT now(),
`update_time` DATETIME DEFAULT now(),
PRIMARY KEY ( id )) ENGINE = INNODB DEFAULT CHARACTER
SET = utf8mb4 COMMENT = '产品表';
-- 数据初始化
insert into product_detail (id, product_name,product_price,state)
values
(1001,"T恤", 101, 0), (1002, "短袖",30, 0), (1003, "短裤",44, 0),
(1004, "卫⾐",58, 0), (1005, "⻢甲",98, 0),(1006,"⽻绒服", 101, 0),
(1007, "冲锋⾐",30, 0), (1008, "袜⼦",44, 0), (1009, "鞋⼦",58, 0),
(10010, "⽑⾐",98, 0);
-- 建库,订单库
create database if not exists cloud_order charset utf8mb4;
-- 使用库
use cloud_order;
-- 订单表
DROP TABLE IF EXISTS order_detail;
CREATE TABLE order_detail (`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '订单id',`user_id` BIGINT ( 20 ) NOT NULL COMMENT '⽤⼾ID',`product_id` BIGINT ( 20 ) NULL COMMENT '产品id',`num` INT ( 10 ) NULL DEFAULT 0 COMMENT '下单数量',`price` BIGINT ( 20 ) NOT NULL COMMENT '实付款',`delete_flag` TINYINT ( 4 ) NULL DEFAULT 0,`create_time` DATETIME DEFAULT now(),`update_time` DATETIME DEFAULT now(),
PRIMARY KEY ( id )) ENGINE = INNODB DEFAULT CHARACTER
SET = utf8mb4 COMMENT = '订单表';
-- 数据初始化
insert into order_detail (user_id,product_id,num,price)
values
(2001, 1001,1,99), (2002, 1002,1,30), (2001, 1003,1,40),
(2003, 1004,3,58), (2004, 1005,7,85), (2005, 1006,7,94);

 工程搭建

搭建父工程

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.wbz</groupId><artifactId>spring-cloud-test</artifactId><version>1.0-SNAPSHOT</version><packaging>pom</packaging><modules><module>cloud-provider-payment8001</module><module>cloud-consumer-order80</module></modules><properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><spring-cloud.version>2023.0.0</spring-cloud.version><spring-cloud-alibaba.version>2022.0.0.0-RC2</spring-cloud-alibaba.version><mysql.version>8.0.31</mysql.version><druid.version>1.2.18</druid.version><mybatis-plus.version>3.5.7</mybatis-plus.version><lombok.version>1.18.28</lombok.version></properties><!--SpringBoot--><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.2.0</version><relativePath/> <!-- lookup parent from repository --></parent><dependencyManagement><dependencies><!--SpringCloud--><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>${spring-cloud.version}</version><type>pom</type><scope>import</scope></dependency><!--SpringCloudAlibaba--><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>${spring-cloud-alibaba.version}</version><type>pom</type><scope>import</scope></dependency><!--MySQL驱动--><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId><version>${mysql.version}</version></dependency><!--Druid--><dependency><groupId>com.alibaba</groupId><artifactId>druid-spring-boot-starter</artifactId><version>${druid.version}</version></dependency><!--MP--><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-spring-boot3-starter</artifactId><version>${mybatis-plus.version}</version></dependency><!--Lombok--><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>${lombok.version}</version></dependency></dependencies></dependencyManagement></project>

搭建子工程 - 商品服务

在该业务背景下,商品服务作为服务提供方出现。

搭建一个模块,一般分为:建模块、写pom文件、写yml文件、改主启动类、写业务类。

建模块 

 写pom文件

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>com.wbz</groupId><artifactId>spring-cloud-test</artifactId><version>1.0-SNAPSHOT</version></parent><artifactId>cloud-provider-product8001</artifactId><properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><!--SpringBoot通用模块--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!--Lombok--><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></dependency><!--Druid--><dependency><groupId>com.alibaba</groupId><artifactId>druid-spring-boot-starter</artifactId></dependency><!--MySQL驱动--><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId></dependency><!--MP--><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-spring-boot3-starter</artifactId></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>

 写yml文件

server:port: 8001spring:application:name: cloud-provider-payment8001mvc:pathmatch:matching-strategy: ant_path_matcher # 路径匹配策略datasource:url: jdbc:mysql://127.0.0.1:3306/cloud_product?characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true&allowMultiQueries=trueusername: rootpassword: rootdriver-class-name: com.mysql.cj.jdbc.Driverprofiles:active: devmybatis-plus:configuration:map-underscore-to-camel-case: truelog-impl: org.apache.ibatis.logging.stdout.StdOutImplmapper-locations: classpath:mapper/**Mapper.xmltype-aliases-package: com.wbz.domain

 改主启动类

/*** 微服务生产者模块,表示被调用的一方*/@MapperScan("com.wbz.mapper")
@SpringBootApplication
public class ProductProviderApplication8001 {public static void main(String[] args) {SpringApplication.run(ProductProviderApplication8001.class, args);}}

 写业务类

// model
/*** 产品表*/@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("product_detail")
public class Product {@TableIdprivate Long id;@TableFieldprivate String productName;@TableFieldprivate Long productPrice;@TableFieldprivate Integer state;@TableField@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")private LocalDateTime createTime;@TableField@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")private LocalDateTime updateTime;}// 持久层接口
public interface ProduceMapper extends BaseMapper<Product> {
}// 服务层接口
public interface ProductService extends IService<Product> {Product getProductById(Long productId);}// 服务层实现类
@Service
public class ProductServiceImpl extends ServiceImpl<ProduceMapper, Product> implements ProductService {@Overridepublic Product getProductById(Long productId) {return this.getById(productId);}}// 控制层类
@RestController
@RequestMapping("/product")
public class ProductController {@Resourceprivate ProductService productService;@GetMapping("/query/{productId}")public Product getProductById(@PathVariable Long productId) {return this.productService.getProductById(productId);}}

启动项目之后,访问url:127.0.0.1:8001/product/query/1001,返回如下页面就算调用成功:

 

整体代码结构如下:

搭建子工程 - 订单服务

在该业务背景下,订单服务作为服务调用方出现。

建模块

写pom文件

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>com.wbz</groupId><artifactId>spring-cloud-test</artifactId><version>1.0-SNAPSHOT</version></parent><artifactId>cloud-consumer-order80</artifactId><properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><!--SpringBoot通用模块--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!--Lombok--><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></dependency><!--Druid--><dependency><groupId>com.alibaba</groupId><artifactId>druid-spring-boot-starter</artifactId></dependency><!--MySQL驱动--><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId></dependency><!--MP--><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-spring-boot3-starter</artifactId></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>

写yml文件

server:port: 80spring:application:name: cloud-consumer-order80mvc:pathmatch:matching-strategy: ant_path_matcher # 路径匹配策略datasource:url: jdbc:mysql://127.0.0.1:3306/cloud_order?characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true&allowMultiQueries=trueusername: rootpassword: rootdriver-class-name: com.mysql.cj.jdbc.Driverprofiles:active: devmybatis-plus:configuration:map-underscore-to-camel-case: truelog-impl: org.apache.ibatis.logging.stdout.StdOutImplmapper-locations: classpath:mapper/**Mapper.xmltype-aliases-package: com.wbz.domain

改主启动类

/*** 微服务消费者模块,调用的一方*/@SpringBootApplication
@MapperScan("com.wbz.mapper")
public class OrderConsumerApplication80 {public static void main(String[] args) {SpringApplication.run(OrderConsumerApplication80.class, args);}}

写业务类

// 实体类
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("order_detail")
public class Order {@TableIdprivate Long id;@TableFieldprivate Long userId;@TableFieldprivate Long productId;@TableFieldprivate Integer num;@TableFieldprivate Long price;@TableFieldprivate Integer deleteFlag;@TableField@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")private LocalDateTime createTime;@TableField@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")private LocalDateTime updateTime;@TableField(exist = false)private Product product;}// mapper接口
public interface OrderMapper extends BaseMapper<Order> {
}// service接口
public interface OrderService extends IService<Order> {Order getOrderById(Integer id);}// RestTemplateConfig实现类
@Configuration
public class RestTemplateConfig {@Beanpublic RestTemplate restTemplate() {return new RestTemplate();}}// service实现类
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {@Resourceprivate RestTemplate restTemplate;@Overridepublic Order getOrderById(Integer id) {Order order = this.getById(id);String url = "http://127.0.0.1:8001/product/query/" + order.getProductId();Product product = this.restTemplate.getForObject(url, Product.class);order.setProduct(product);return order;}}// controller实现类
@RestController
@RequestMapping("/order")
public class OrderController {@Resourceprivate OrderService orderService;@GetMapping("/query/{id}")public Order getOrderById(@PathVariable Integer id) {return this.orderService.getOrderById(id);}}

启动项目之后,访问url:127.0.0.1/order/query/1,出现如下页面就算调用成功:

相关文章:

【微服务】组件、基础工程构建(day2)

组件 服务注册和发现 微服务模块中&#xff0c;一般是以集群的方式进行部署的&#xff0c;如果我们调用的时候以硬编码的方式&#xff0c;那么当服务出现问题、服务扩缩容等就需要对代码进行修改&#xff0c;这是非常不好的。所以微服务模块中就出现了服务注册和发现组件&…...

ESP32微信小程序SmartConfig配网

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 ESP32&微信小程序SmartConfig配网 前言一、SmartConfig是什么&#xff1f;二、使用乐鑫官方的smart_config例子1.运行照片 三、微信小程序总结 前言 本人是酷爱ESP32S3这…...

【PostgreSQL】提高篇——深入了解不同类型的 JOIN(INNER JOIN、LEFT JOIN、RIGHT JOIN、FULL JOIN)应用操作

1. JOIN 的基础概念 在 SQL 中&#xff0c;JOIN 是用于从两个或多个表中组合行的操作。JOIN 允许我们根据某些条件将表中的数据关联在一起。常见的 JOIN 类型包括&#xff1a; INNER JOIN&#xff1a;仅返回两个表中满足连接条件的行。LEFT JOIN&#xff08;或 LEFT OUTER JO…...

师生健康信息管理:SpringBoot技术突破

第4章 系统设计 4.1 系统体系结构 师生健康信息管理系统的结构图4-1所示&#xff1a; 图4-1 系统结构 登录系统结构图&#xff0c;如图4-2所示&#xff1a; 图4-2 登录结构图 师生健康信息管理系统结构图&#xff0c;如图4-3所示。 图4-3 师生健康信息管理系统结构图 4.2…...

【完-网络安全】Windows注册表

文章目录 注册表启动项及常见作用五个根节点常见入侵方式 注册表 注册表在windows系统的配置和控制方面扮演了一个非常关键的角色&#xff0c;它既是系统全局设置的存储仓库&#xff0c;也是每个用户的设置信息的存储仓库。 启动项及常见作用 快捷键 WinR打开运行窗口&#x…...

车辆重识别(2021NIPS在图像合成方面,扩散模型打败了gans网络)论文阅读2024/10/01

本文在架构方面的创新&#xff1a; ①增加注意头数量&#xff1a; 使用32⇥32、16⇥16和8⇥8分辨率的注意力&#xff0c;而不是只使用16⇥16 ②使用BigGAN残差块 使用Big GAN残差块对激活进行上采样和下采样 ③自适应组归一化层 将经过组归一化操作后的时间步和类嵌入到每…...

掌控物体运动艺术:图扑 Easing 函数实践应用

现如今&#xff0c;前端开发除了构建功能性的网站和应用程序外&#xff0c;还需要创建具有吸引力且尤为流畅交互的用户界面&#xff0c;其中动画技术在其中发挥着至关重要的作用。在数字孪生领域&#xff0c;动画的应用显得尤为重要。数字孪生技术通过精确模拟现实世界中的对象…...

Python从入门到高手4.2节-掌握循环控制语句

目录 4.2.1 理解循环控制 4.2.2 for循环结构 4.2.3 循环结构的else语句 4.2.4 while循环结构 4.2.5 循环结构可以嵌套 4.2.6 国庆节吃好玩好 4.2.1 理解循环控制 我们先来搞清楚循环的含义。以下内容引自汉语词典: 循环意指往复回旋&#xff0c;指事物周而复始地运动或变…...

CSS 中的overscroll-behavior属性

overscroll-behavior 是 CSS 中的一个属性&#xff0c;它用于控制元素在发生滚动时&#xff0c;当滚动范围超出其边界时的行为。这个属性对于改善用户体验特别有用&#xff0c;尤其是在移动端设备上&#xff0c;当用户尝试滚动一个已经达到滚动极限的元素时&#xff0c;可以通过…...

GPT对话知识库——在STM32的平台下,通过SPI读取和写入Flash的步骤。

目录 1&#xff0c;问&#xff1a; 1&#xff0c;答&#xff1a; 步骤概述 步骤 1&#xff1a;SPI 初始化 步骤 2&#xff1a;Flash 初始化&#xff08;可选&#xff09; 步骤 3&#xff1a;发送读取命令 示例&#xff1a;发送读取数据命令 步骤 4&#xff1a;读取数据…...

Pytorch基本知识

model.state_dict()、model.parameters()和model.named_parameters()的区别 parameters()只包含模块的参数,即weight和bias(包括BN的)。 named_parameters()返回包含模块名和模块的参数的列表,列表的每个元素均是包含layer name和layer param的元组。layer param就是param…...

vue3使用Teleport 控制台报警告:Invalid Teleport target on mount: null (object)

Failed to locate Teleport target with selector “.demon”. Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree main.…...

使用产品前的环境搭建

对于想学习编程的朋友们&#xff0c;使用本产品解决日常功能需求的同时会对自己编程能力具有较大帮助和提升。 目录 环境搭建 前言&#xff1a; 安装python 安装vscode 下载安装Anaconda 通过conda配置python环境 创建虚拟环境 查看环境是否创建成功 激活环境 安装pyt…...

JAVA基础语法 day07

一、final关键字 1.1final的基础知识 用来修饰类&#xff0c;方法&#xff0c;变量 final修饰类&#xff0c;该类被称为终极类&#xff0c;不能被继承了 final修饰方法&#xff0c;该方法称为终极方法&#xff0c;不能被重写了 final修饰变量&#xff0c;该变量仅能被赋值…...

ZLMediaKit编译运行

ZLMediaKit-github官网 快速开始 代码依赖与版权声明 MediaServer支持的HTTP MediaServer支持的HTTP HOOK API cd ZLMediaKit mkdir build cd build cmake … && make -j20 cd ZLMediaKit/release/linux/Debug ./MediaServer //./MediaServer -h 查看 //./MediaSe…...

AlmaLinux 9 安装mysql8.0.38

文件下载 https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.39-linux-glibc2.12-x86_64.tar 选择合适系统版本 下载后解压 tar -xvf mysql-8.0.39-linux-glibc2.12-x86_64.tar解压后里面有三个文件夹 使用mysql-8.0.39-linux-glibc2.12-x86_64.tar.xz即可&#xff0c…...

NLP任务之文本分类(情感分析)

目录 1 加载预训练模型对应的分词器 2 加载数据集 3 数据预处理 4 构建数据加载器DataLoader 5 定义下游任务模型 6 测试代码 7 训练代码 #做&#xff08;中文与英文的&#xff09;分类任务&#xff0c;Bert模型比较合适&#xff0c;用cls向下游任务传输数…...

MIMO 2T4R BBU RHUB AAU

MIMO&#xff08;Multiple-Input Multiple-Output&#xff0c;多输入多输出&#xff09;是一种无线通信技术&#xff0c;它通过在发射端和接收端使用多个天线来提高数据传输速率和信号质量。"2T4R"是MIMO技术中的一种配置&#xff0c;其中"2T"代表有两个发…...

图说数集相等定义表明“R各元x的对应x+0.0001的全体=R“是几百年重大错误

黄小宁 设集A&#xff5b;x&#xff5d;表A各元均由x代表&#xff0c;&#xff5b;x&#xff5d;中变量x的变域是A。其余类推。因各数x可是数轴上点的坐标故x∈R变为实数yx1的几何意义可是&#xff1a;一维空间“管道”g内R轴上的质点x∈R(x是点的坐标)沿“管道”g平移变为点y…...

只出现一次的数字|||(考察点为位操作符)

目录 一题目&#xff1a; 二思路汇总&#xff1a; 三代码解答&#xff1a; 一题目&#xff1a; leetcode原题链接&#xff1a;. - 力扣&#xff08;LeetCode&#xff09; 二思路汇总&#xff1a; 思路&#xff1a;如果直接对数组按位异或&#xff0c;那么最后得到的是a^b&a…...

深入剖析AI大模型:大模型时代的 Prompt 工程全解析

今天聊的内容&#xff0c;我认为是AI开发里面非常重要的内容。它在AI开发里无处不在&#xff0c;当你对 AI 助手说 "用李白的风格写一首关于人工智能的诗"&#xff0c;或者让翻译模型 "将这段合同翻译成商务日语" 时&#xff0c;输入的这句话就是 Prompt。…...

工业安全零事故的智能守护者:一体化AI智能安防平台

前言&#xff1a; 通过AI视觉技术&#xff0c;为船厂提供全面的安全监控解决方案&#xff0c;涵盖交通违规检测、起重机轨道安全、非法入侵检测、盗窃防范、安全规范执行监控等多个方面&#xff0c;能够实现对应负责人反馈机制&#xff0c;并最终实现数据的统计报表。提升船厂…...

【磁盘】每天掌握一个Linux命令 - iostat

目录 【磁盘】每天掌握一个Linux命令 - iostat工具概述安装方式核心功能基础用法进阶操作实战案例面试题场景生产场景 注意事项 【磁盘】每天掌握一个Linux命令 - iostat 工具概述 iostat&#xff08;I/O Statistics&#xff09;是Linux系统下用于监视系统输入输出设备和CPU使…...

新能源汽车智慧充电桩管理方案:新能源充电桩散热问题及消防安全监管方案

随着新能源汽车的快速普及&#xff0c;充电桩作为核心配套设施&#xff0c;其安全性与可靠性备受关注。然而&#xff0c;在高温、高负荷运行环境下&#xff0c;充电桩的散热问题与消防安全隐患日益凸显&#xff0c;成为制约行业发展的关键瓶颈。 如何通过智慧化管理手段优化散…...

Reasoning over Uncertain Text by Generative Large Language Models

https://ojs.aaai.org/index.php/AAAI/article/view/34674/36829https://ojs.aaai.org/index.php/AAAI/article/view/34674/36829 1. 概述 文本中的不确定性在许多语境中传达,从日常对话到特定领域的文档(例如医学文档)(Heritage 2013;Landmark、Gulbrandsen 和 Svenevei…...

iOS性能调优实战:借助克魔(KeyMob)与常用工具深度洞察App瓶颈

在日常iOS开发过程中&#xff0c;性能问题往往是最令人头疼的一类Bug。尤其是在App上线前的压测阶段或是处理用户反馈的高发期&#xff0c;开发者往往需要面对卡顿、崩溃、能耗异常、日志混乱等一系列问题。这些问题表面上看似偶发&#xff0c;但背后往往隐藏着系统资源调度不当…...

R 语言科研绘图第 55 期 --- 网络图-聚类

在发表科研论文的过程中&#xff0c;科研绘图是必不可少的&#xff0c;一张好看的图形会是文章很大的加分项。 为了便于使用&#xff0c;本系列文章介绍的所有绘图都已收录到了 sciRplot 项目中&#xff0c;获取方式&#xff1a; R 语言科研绘图模板 --- sciRplothttps://mp.…...

MacOS下Homebrew国内镜像加速指南(2025最新国内镜像加速)

macos brew国内镜像加速方法 brew install 加速formula.jws.json下载慢加速 &#x1f37a; 最新版brew安装慢到怀疑人生&#xff1f;别怕&#xff0c;教你轻松起飞&#xff01; 最近Homebrew更新至最新版&#xff0c;每次执行 brew 命令时都会自动从官方地址 https://formulae.…...

django blank 与 null的区别

1.blank blank控制表单验证时是否允许字段为空 2.null null控制数据库层面是否为空 但是&#xff0c;要注意以下几点&#xff1a; Django的表单验证与null无关&#xff1a;null参数控制的是数据库层面字段是否可以为NULL&#xff0c;而blank参数控制的是Django表单验证时字…...

Spring AI Chat Memory 实战指南:Local 与 JDBC 存储集成

一个面向 Java 开发者的 Sring-Ai 示例工程项目&#xff0c;该项目是一个 Spring AI 快速入门的样例工程项目&#xff0c;旨在通过一些小的案例展示 Spring AI 框架的核心功能和使用方法。 项目采用模块化设计&#xff0c;每个模块都专注于特定的功能领域&#xff0c;便于学习和…...