001 SpringCloudAlibaba整合 - Nacos注册配置中心、Sentinel流控、Zipkin链路追踪、Admin监控

SpringCloudAlibaba

文章目录

  • SpringCloudAlibaba
    • 1.版本依赖关系
        • 2022.x 分支
        • 2021.x 分支
        • 2.2.x 分支
      • 组件版本关系
    • 2.基础项目构建
      • 1.引入全局pom文件
      • 2.创建对应的模块
    • 3.SpringBootAdmin监控服务整合
      • 1.cloud-admin服务搭建
        • 1.导入服务端依赖
        • 2.主启动类添加`@EnableAdminServer`注解启用监控
      • 2.客户端配置
        • 1.引入客户端和端点监控依赖
        • 2.配置yml
      • 3.启动测试
    • 4.Nacos注册中心、配置中心整合
      • 1.下载、安装
        • 修改启动模式
        • 创建命名空间
      • 2.注册中心整合
        • 1.引入pom服务注册发现依赖
        • 2.yml配置
        • 3.主启动类添加`@EnableDiscoveryClient`注解
        • 4.启动测试
      • 3.配置中心整合
        • 1.引入pom依赖
        • 2.yml配置
        • 3.配置nacos数据库连接
        • 4.配置中心创建yml文件
    • 5.Gateway网关整合
      • 1.添加pom依赖
      • 2.配置跨域
      • 3.yml路由配置
    • 6.Sentinel流控整合
      • 1.下载、安装
      • 2.整合
        • 1.引入pom依赖
        • 2.yml配置
        • 3.启动测试
    • 7.Sleuth、Zipkin 链路追踪整合
      • 1.下载、安装
      • 2.整合
        • 1.引入pom依赖
        • 2.配置yml
        • 3.启动测试

1.版本依赖关系

官方地址:https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E

由于 Spring Boot 3.0,Spring Boot 2.7~2.4 和 2.4 以下版本之间变化较大,目前企业级客户老项目相关 Spring Boot 版本仍停留在 Spring Boot 2.4 以下,为了同时满足存量用户和新用户不同需求,社区以 Spring Boot 3.0 和 2.4 分别为分界线,同时维护 2022.x、2021.x、2.2.x 三个分支迭代。如果不想跨分支升级,如需使用新特性,请升级为对应分支的新版本。

2022.x 分支

适配 Spring Boot 3.0,Spring Cloud 2022.x 版本及以上的 Spring Cloud Alibaba 版本按从新到旧排列如下表(最新版本用*标记): (注意,该分支 Spring Cloud Alibaba 版本命名方式进行了调整,未来将对应 Spring Cloud 版本,前三位为 Spring Cloud 版本,最后一位为扩展版本,比如适配 Spring Cloud 2022.0.0 版本对应的 Spring Cloud Alibaba 第一个版本为:2022.0.0.0,第个二版本为:2022.0.0.1,依此类推)

Spring Cloud Alibaba VersionSpring Cloud VersionSpring Boot Version
2022.0.0.0*Spring Cloud 2022.0.03.0.2
2022.0.0.0-RC2Spring Cloud 2022.0.03.0.2
2022.0.0.0-RC1Spring Cloud 2022.0.03.0.0
2021.x 分支

适配 Spring Boot 2.4,Spring Cloud 2021.x 版本及以上的 Spring Cloud Alibaba 版本按从新到旧排列如下表(最新版本用*标记):

Spring Cloud Alibaba VersionSpring Cloud VersionSpring Boot Version
2021.0.5.0*Spring Cloud 2021.0.52.6.13
2021.0.4.0Spring Cloud 2021.0.42.6.11
2021.0.1.0Spring Cloud 2021.0.12.6.3
2021.1Spring Cloud 2020.0.12.4.2
2.2.x 分支

适配 Spring Boot 为 2.4,Spring Cloud Hoxton 版本及以下的 Spring Cloud Alibaba 版本按从新到旧排列如下表(最新版本用*标记):

Spring Cloud Alibaba VersionSpring Cloud VersionSpring Boot Version
2.2.10-RC1*Spring Cloud Hoxton.SR122.3.12.RELEASE
2.2.9.RELEASESpring Cloud Hoxton.SR122.3.12.RELEASE
2.2.8.RELEASESpring Cloud Hoxton.SR122.3.12.RELEASE
2.2.7.RELEASESpring Cloud Hoxton.SR122.3.12.RELEASE
2.2.6.RELEASESpring Cloud Hoxton.SR92.3.2.RELEASE
2.2.1.RELEASESpring Cloud Hoxton.SR32.2.5.RELEASE
2.2.0.RELEASESpring Cloud Hoxton.RELEASE2.2.X.RELEASE
2.1.4.RELEASESpring Cloud Greenwich.SR62.1.13.RELEASE
2.1.2.RELEASESpring Cloud Greenwich2.1.X.RELEASE
2.0.4.RELEASE(停止维护,建议升级)Spring Cloud Finchley2.0.X.RELEASE
1.5.1.RELEASE(停止维护,建议升级)Spring Cloud Edgware1.5.X.RELEASE

组件版本关系

每个 Spring Cloud Alibaba 版本及其自身所适配的各组件对应版本如下表所示(注意,Spring Cloud Dubbo 从 2021.0.1.0 起已被移除出主干,不再随主干演进):

Spring Cloud Alibaba VersionSentinel VersionNacos VersionRocketMQ VersionDubbo VersionSeata Version
2022.0.0.01.8.62.2.14.9.4~1.7.0
2022.0.0.0-RC21.8.62.2.14.9.4~1.7.0-native-rc2
2021.0.5.01.8.62.2.04.9.4~1.6.1
2.2.10-RC11.8.62.2.04.9.4~1.6.1
2022.0.0.0-RC11.8.62.2.1-RC4.9.4~1.6.1
2.2.9.RELEASE1.8.52.1.04.9.4~1.5.2
2021.0.4.01.8.52.0.44.9.4~1.5.2
2.2.8.RELEASE1.8.42.1.04.9.3~1.5.1
2021.0.1.01.8.31.4.24.9.2~1.4.2
2.2.7.RELEASE1.8.12.0.34.6.12.7.131.3.0
2.2.6.RELEASE1.8.11.4.24.4.02.7.81.3.0
2021.1 or 2.2.5.RELEASE or 2.1.4.RELEASE or 2.0.4.RELEASE1.8.01.4.14.4.02.7.81.3.0
2.2.3.RELEASE or 2.1.3.RELEASE or 2.0.3.RELEASE1.8.01.3.34.4.02.7.81.3.0
2.2.1.RELEASE or 2.1.2.RELEASE or 2.0.2.RELEASE1.7.11.2.14.4.02.7.61.2.0
2.2.0.RELEASE1.7.11.1.44.4.02.7.4.11.0.0
2.1.1.RELEASE or 2.0.1.RELEASE or 1.5.1.RELEASE1.7.01.1.44.4.02.7.30.9.0
2.1.0.RELEASE or 2.0.0.RELEASE or 1.5.0.RELEASE1.6.31.1.14.4.02.7.30.7.1

2.基础项目构建

1.引入全局pom文件

<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.6.11</version><relativePath/></parent><groupId>com.li</groupId><artifactId>spring-cloud-alibaba-parent</artifactId><packaging>pom</packaging><version>1.0-SNAPSHOT</version><modules><module>cloud-common</module><module>cloud-picture</module><module>cloud-login</module><module>cloud-gateway</module><module>cloud-data-clean</module><module>cloud-data-production</module><module>cloud-admin</module><module>cloud-auth</module></modules><dependencies><!--由于2021版本去除了-bootstrap.yml支持、所以我们要加上去--><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-bootstrap</artifactId></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>2.6.11</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>2021.0.4</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>2021.0.4.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><!--maven插件--><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 --><mainClass>none</mainClass><!-- 为了解决依赖模块找不到此模块中的类或属性 --><classifier>execute</classifier> </configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build>

2.创建对应的模块

目前创建了这些,测试用

        <module>cloud-common</module> <!--公共模块--><module>cloud-picture</module><!--图片模块--><module>cloud-login</module><!--登录模块--><module>cloud-gateway</module><!--网关模块--><module>cloud-data-clean</module><module>cloud-data-production</module><module>cloud-admin</module> <!--监控模块--><module>cloud-auth</module><!--认证模块-->

创建启动类和yml配置文件,微服务项目yml文件名建议使用bootstrap.yml,加载优先级大于application

配置各个模块yml

server:port: 10000
spring:profiles:active: devapplication:name: cloud-admin#信息断点
info:tags:environment: cloud-admin
#日志收集
logging:file:name: ./log/admin-application.logpattern:file: '%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID}){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wEx'

引入各模块基础公共依赖

        <dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>${org.projectlombok.version}</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>${fastjson.version}</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId></dependency><!--开启自定义 配置 需要提示功能--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-configuration-processor</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>

3.SpringBootAdmin监控服务整合

1.cloud-admin服务搭建

1.导入服务端依赖
       <dependency><groupId>de.codecentric</groupId><artifactId>spring-boot-admin-starter-server</artifactId></dependency>
2.主启动类添加@EnableAdminServer注解启用监控

2.客户端配置

1.引入客户端和端点监控依赖
        <dependency><groupId>de.codecentric</groupId><artifactId>spring-boot-admin-starter-client</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency>
2.配置yml
spring:boot:admin:client:# Admin Server的URL,若是要注册到多个admin服务端上,用逗号分隔就可以# url: http://localhost:8080,http://localhost:8081url: http://127.0.0.1:10000instance:# 使用IP的方式prefer-ip: true#按实例显示标签metadata:tags:environment: cloud-authmanagement:endpoint:health:show-details: always  # 显示health指标的详细信息,否则只会显示 status#暴露所有端点,生产环境不建议endpoints:web:exposure:include: ["*"]                 

3.启动测试

访问服务端:http://localhost:10000/applications/cloud-admin

4.Nacos注册中心、配置中心整合

1.下载、安装

官方文档及下载地址:https://nacos.io/download/nacos-server/?spm=5238cd80.2ef5001f.0.0.3f613b7ctaHA8j

下载完后解压

修改启动模式

如果直接启动则默认是集群方式启动会报错,需进入binstartup.cmd配置文件修改modestandalone,单结点启动

保存后双击启动即可

访问 http://localhost:8848/nacos/ ,用户名密码默认nacos,默认端口号8848

创建命名空间

点击创建即可

2.注册中心整合

1.引入pom服务注册发现依赖

对需要注册的服务模块引入

       <dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency>
2.yml配置
spring:cloud:nacos:discovery:# 服务注册地址server-addr: 127.0.0.1:8848#命名空间id,不配置默认为public# namespace: 5bd397d3-505f-44f5-95fa-a62e631b9b41
3.主启动类添加@EnableDiscoveryClient注解
4.启动测试

如果配置了命名空间则需要切换对应的空间

3.配置中心整合

1.引入pom依赖
        <dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency>
2.yml配置
spring:cloud:nacos:config:# 配置中心地址server-addr: 127.0.0.1:8848# 配置文件格式file-extension: yml# 共享配置shared-configs:- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}#命名空间配置namespace: 5bd397d3-505f-44f5-95fa-a62e631b9b41#组配置#group: dev
3.配置nacos数据库连接

进入nacos目录下conf下的application.properties文件进行编辑

#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
spring.datasource.platform=mysql### Count of DB:
db.num=1### Connect URL of DB:db.url.0=jdbc:mysql://xxx:3306/xxx?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTCdb.user.0=rootdb.password.0=xxx### Connection pool configuration: hikariCP
db.pool.config.connectionTimeout=30000
db.pool.config.validationTimeout=10000
db.pool.config.maximumPoolSize=20
db.pool.config.minimumIdle=2

数据库执行该sql文件,重启

4.配置中心创建yml文件

注意:

1.文件名必须带.yml

2.组配置可以不给,默认default_group,如果给了则需要配置group

3.后缀名根据spring的profiles的active切换

例如:有配置中心有四个文件配置,本地dev和prod配置相同

cloud-admin-dev.yml 组配置dev 配置 test:1

cloud-admin-prod.yml 组配置dev 配置 test:2

cloud-admin-prod.yml 组配置prod 配置 test:3

cloud-admin-dev.yml 组配置prod 配置 test:4

测试结果:

本地yml组配置本地spring.profiles.active配置获取test结果
devdev1
devprod2
prodprod3
proddev4

5.Gateway网关整合

1.添加pom依赖

       <dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-gateway</artifactId></dependency>

注意:由于网关已经包含了spring-boot-starter-web依赖,如果重复引入需排除掉

2.配置跨域

@Configuration
public class ApiCorsConfiguration {@Beanpublic CorsWebFilter corsWebFilter() {UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();CorsConfiguration corsConfiguration = new CorsConfiguration();//1、配置跨域corsConfiguration.addAllowedHeader("*");corsConfiguration.addAllowedMethod("*");corsConfiguration.addAllowedOrigin("*");corsConfiguration.setAllowCredentials(true);source.registerCorsConfiguration("/**", corsConfiguration);return new CorsWebFilter(source);}
}

3.yml路由配置

spring:cloud:gateway:#路由配置:转发规则routes:# id:唯一标识。默认是一个UUID# uri:转发路径# predicates:条件,用于请求网关路径的匹配规则- id: test_routeuri: https://www.baidu.compredicates:- Query=url,baidu- id: picture_routeuri: lb://cloud-picturepredicates:- Path=/api/picture/**,/hellofilters:- RewritePath=/api/(?<segment>.*),/$\{segment}- id: login_routeuri: lb://cloud-loginpredicates:- Path=/api/login/**filters:- RewritePath=/api/(?<segment>.*),/$\{segment}- id: gateway-routeuri: lb://cloud-gatewaypredicates:- Path=/api/gateway/**filters:- RewritePath=/api/(?<segment>.*),/$\{segment}- id: admin-routeuri: lb://cloud-adminpredicates:- Path=/api/admin/**filters:- RewritePath=/api/(?<segment>.*),/$\{segment}- id: production-routeuri: lb://cloud-productionpredicates:- Path=/api/production/**filters:- RewritePath=/api/(?<segment>.*),/$\{segment}

详细配置可参考另一篇文章: SpringCloudNetflix - Feign 调用、Hystix 熔断和 Gateway 网关

https://blog.csdn.net/weixin_54158370/article/details/125165136

6.Sentinel流控整合

1.下载、安装

下载地址:https://github.com/alibaba/Sentinel/tags

本地使用版本1.8.5

下载后通过java -jar启动,输入http://localhost:8080/访问,默认账号密码sentinel

2.整合

1.引入pom依赖
        <dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-sentinel</artifactId></dependency>
2.yml配置
spring: cloud:#监控限流sentinel:# 是否初始化时就全部加载 默认关闭,如果关闭启动时候可能会看不到服务eager: truetransport:#通信端口 假如被占用了会自动从8719开始依次+1扫描。直至找到未被占用的端口,默认8719port: 8719 #客户端地址,默认8080dashboard: 127.0.0.1:8080 
3.启动测试

7.Sleuth、Zipkin 链路追踪整合

1.下载、安装

下载地址:https://repo1.maven.org/maven2/io/zipkin/zipkin-server/

1.安装启动zipkin java -jar zipkin.jar

2.访问zipkin web界面。http://localhost:9411/

2.整合

1.引入pom依赖
  <!--sleuth-zipkin--><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-zipkin</artifactId></dependency>

(zipkin中已经依赖了sleuth,所以可以不导)

        <dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-sleuth</artifactId></dependency>
2.配置yml
spring:sleuth:web:client:# 开启采集链路enabled: truesampler:# 默认采集是 0.1(百分之十),生产环境采用默认,测试环境可以修改为1.0probability: 1.0# zipkin服务所在地址zipkin:base-url: http://127.0.0.1:9411/discovery-client-enabled: false #让nacos把它当成一个URL,而不要当做服务名
3.启动测试

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/18302.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

关于视频去水印的一点尝试

一. 视频去水印的几种方法 1. 使用ffmpeg delogo滤镜 delogo 滤镜的原理是通过插值算法&#xff0c;用水印周围的像素填充水印的位置。 示例&#xff1a; ffmpeg -i input.mp4 -filter_complex "[0:v]delogox420:y920:w1070:h60" output.mp4 该命令表示通过滤镜…

harmonyOS的文件的增、删、读、写相关操作(fs/content)

注意: 操作harmonyOS的文件只能对app沙箱内的文件进行操作 牵扯到两个支持点: fs和content这两个API; 具体的操作方法看下图: 创建文件 //js 引入 import fs from "ohos.files.fs" import featureAbility from "ohos.ability.featureAbility"; // 上下…

(Windows | Linux)ssh访问服务器报错:no matching key exchange method found

问题现象 ssh user1192.168.1X.XX Unable to negotiate with 192.168.1X.XX port 22: no matching key exchange method found. Their offer: gss-group1-sha1-toWM5Slw5Ew8Mqkayal2g,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-…

Docker拉不下来镜像问题解决法案

打开docker的设置界面 配置如下&#xff1a; vi /etc/docker/daemon.json {"builder": {"gc": {"defaultKeepStorage": "20GB","enabled": true}},"experimental": false,"registry-mirrors": ["…

C++ Primer 参数传递

欢迎阅读我的 【CPrimer】专栏 专栏简介&#xff1a;本专栏主要面向C初学者&#xff0c;解释C的一些基本概念和基础语言特性&#xff0c;涉及C标准库的用法&#xff0c;面向对象特性&#xff0c;泛型特性高级用法。通过使用标准库中定义的抽象设施&#xff0c;使你更加适应高级…

DeepSeek v3 技术报告阅读笔记

注 本文参考 DeepSeek-v3 / v2 / v1 Technical Report 及相关参考模型论文本文不包括基础的知识点讲解&#xff0c;为笔记/大纲性质而非教程&#xff0c;建议阅读技术报告原文交流可发送至邮箱 henryhua0721foxmail.com 架构核心 核心&#xff1a; MLA 高效推理DeepSeekMOE 更…

SQLMesh系列教程-3:SQLMesh模型属性详解

SQLMesh 的 MODEL 提供了丰富的属性&#xff0c;用于定义模型的行为、存储、调度、依赖关系等。通过合理配置这些属性&#xff0c;可以构建高效、可维护的数据管道。在 SQLMesh 中&#xff0c;MODEL 是定义数据模型的核心结构&#xff0c;初学SQLMesh&#xff0c;定义模型看到属…

HCIA综合项目之多技术的综合应用实验

十五 HCIA综合实验 15.1 IP规划 #内网分配网段192.168.1.0 24#内网包括骨干链路和两个用户网段&#xff0c;素以需要划分三个&#xff0c;借两位就够用了192.168.1.0 26--骨干192.168.1.64 26---R1下网络192.168.1.128 26---R2下网络192.168.1.192 26--备用​192.168.1.64 26--…

fastadmin 接口请求提示跨域

问题描述 小程序项目&#xff0c;内嵌h5页面&#xff0c;在h5页面调用后端php接口&#xff0c;提示跨域。网上查找解决方案如下&#xff1a; 1&#xff0c;设置header // 在入口文件index.php直接写入直接写入 header("Access-Control-Allow-Origin:*"); header(&q…

【Spring】_打印Spring日志

目录 1. 打印日志 1.1 方式1&#xff1a;使用System.out.println 1.2 方式2&#xff1a;使用日志对象Logger 1.3 关于日志框架SLF4J 2. 日志级别及其使用 2.1 日志级别 2.2 使用日志级别的方法打印日志信息 3. 使用lombok更简单地打印日志 1. 打印日志 1.1 方式1&…

大数据学习之SparkStreaming、PB级百战出行网约车项目一

一.SparkStreaming 163.SparkStreaming概述 Spark Streaming is an extension of the core Spark API that enables scalable, high-throughput, fault-tolerant stream processing of live data streams. Spark Streaming 是核心 Spark API 的扩展&#xff0c;支持实时数据…

【Elasticsearch】Mapping概述

以下是Elasticsearch中提到的关于Mapping的各模块概述&#xff1a; --- 1.Dynamic mapping&#xff08;动态映射&#xff09; 动态映射是指Elasticsearch在索引文档时&#xff0c;自动检测字段类型并创建字段映射的过程。当你首次索引一个文档时&#xff0c;Elasticsearch会根…

如何构建一个AI驱动的前端UI组件生成器

前言 本文将教您如何构建一个AI驱动的前端UI组件生成器&#xff0c;它可以帮助您生成Next.js Tailwind CSS UI组件&#xff0c;并提供实现教程。我们将涵盖以下内容&#xff1a; 使用Next.js、TypeScript和Tailwind CSS构建UI组件生成器Web应用程序。 使用CopilotKit将AI功能…

无耳科技 Solon v3.0.8 发布,Java 企业级应用开发框架

Solon 框架&#xff01; Solon 是新一代&#xff0c;Java 企业级应用开发框架。是杭州无耳科技有限公司的“根级”开源项目&#xff08;最近“杭州六小龙”很火啊&#xff0c;我们也是杭州的哦&#xff09;。从零开始构建&#xff08;No Spring、No Java-EE、No Servlet&#…

Linux | 进程相关概念(进程、进程状态、进程优先级、环境变量、进程地址空间)

文章目录 进程概念1、冯诺依曼体系结构2、进程2.1基本概念2.2描述进程-PCB2.3组织进程2.4查看进程2.5通过系统调用获取进程标识符2.6通过系统调用创建进程-fork初识fork の 头文件与返回值fork函数的调用逻辑和底层逻辑 3、进程状态3.1状态3.2进程状态查看命令3.2.1 ps命令3.2.…

超越DeepSeek R1的Moe开源大模型 Qwen2.5-max 和 Qwen Chat Web UI 的发布,阿里搅动AI生态

敲黑板&#xff0c;说重点&#xff0c;最近阿里推出的 Qwen2.5-max 和 Qwen Chat Web UI&#xff0c;将对AI生态又一次冲击。 说冲击&#xff0c;因为 DeepSeek R1的热潮还未散退的情况下&#xff0c;由于服务器压力不能注册新的API&#xff0c;然后价格涨价&#xff0c;服务有…

无公网IP可实现外网访问开发速查备忘录 Quick Reference

Quick Reference 是一款为开发人员准备的快速参考和备忘清单&#xff0c;涵盖了各种编程语言、框架、工具和命令行工具的常用语法和用法。目的就是为了开发人员在开发时方便技术栈查阅&#xff0c;提高开发者的开发效率。 本文将详细的介绍如何利用 Docker 在本地部署 Quick Re…

【ARM】JTAG接口介绍

1、 文档目标 对 JTAG 接口有更多的认识&#xff0c;在遇到关于 JTAG 接口问题时有一些排查的思路。 2、 问题场景 在使用调试器过程时&#xff0c;免不了要接触到 JTAG 接口&#xff0c;当出现连接不上时&#xff0c;就不知道从哪来进行排查。 3、软硬件环境 1 软件版本&am…

两步在 Vite 中配置 Tailwindcss

第一步&#xff1a;安装依赖 npm i -D tailwindcss tailwindcss/vite第二步&#xff1a;引入 tailwindcss 更改配置 // src/main.js import tailwindcss/index// vite.config.js import vue from vitejs/plugin-vue import tailwindcss from tailwindcss/viteexport default …

Threadlocal的实现原理

文章目录 ThreadLocal与Thread关系分析Threadlocal 不支持继承性lnheritableThreadLocal 类 ThreadLocal与Thread关系分析 由该图可知&#xff0c; Thread 类中有一个 threadLocals 和一个 inheritableThreadLocals &#xff0c; 它们 都是 ThreadLocalMap 类型 的变量 &#x…