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

pc网站开发获取位置交换友情链接的方法

pc网站开发获取位置,交换友情链接的方法,服装集团网站建设,广西营销型网站建设公司文章目录 一、版本兼容性二、Spring Cloud Gateway 重大更新1、新增功能1.1 Function & Stream 处理器集成1.2 Bucket4j 限流器支持 2、重要弃用2.1. WebClientRouting 基础设施2.2. 模块和启动器重命名 3、破坏性变更3.1 X-Forwarded-* 头部默认禁用3.2 配置受信任代理:3.…

文章目录

  • 一、版本兼容性
  • 二、Spring Cloud Gateway 重大更新
    • 1、新增功能
      • 1.1 Function & Stream 处理器集成
      • 1.2 Bucket4j 限流器支持
    • 2、重要弃用
      • 2.1. WebClientRouting 基础设施
      • 2.2. 模块和启动器重命名
    • 3、破坏性变更
      • 3.1 X-Forwarded-* 头部默认禁用
      • 3.2 配置受信任代理:
      • 3.3 安全影响:
  • 三、Spring Cloud Config 增强
    • AWS S3 YAML Profile 支持
  • 四、Spring Cloud Kubernetes 更新
    • 组合配置源支持
  • 五、Spring Cloud Circuitbreaker 新特性
    • 响应式隔离支持
  • 六、Spring Cloud Netflix 改进
    • Eureka 客户端增强
  • 七、版本更新清单
  • 八、升级指南
    • 1、前置条件
    • 2、升级步骤
      • 2.1. 更新 BOM 版本
      • 2.2. Gateway 模块迁移
      • 2.3. 配置属性迁移
      • 2.4. 安全配置更新
      • 2.5. Spring Cloud Alibaba 兼容性注意事项

Spring Cloud 2025.0.0 “Northfields” 于 2025年5月29日正式发布,完全兼容 Spring Boot 3.5.0。本版本在微服务架构的多个核心组件上进行了重要改进和功能增强。

一、版本兼容性

• Spring Boot: 3.5.0
• 发布代号: Northfields (按字母顺序命名传统)
• 主要变更: 包含破坏性变更,不支持平滑升级,细节请看这篇文章

二、Spring Cloud Gateway 重大更新

1、新增功能

1.1 Function & Stream 处理器集成

Gateway 现在原生支持 spring-cloud-function 和 spring-cloud-stream 处理器:

spring:cloud:gateway:routes:-id:function-routeuri:function://myFunctionpredicates:-Path=/api/process/**-id:stream-routeuri:stream://myStreamProcessorpredicates:- Path=/api/stream/**

技术优势:
• 支持函数式编程模型处理请求
• 集成消息驱动架构 (Kafka, RabbitMQ)
• 简化 Serverless 和事件驱动架构实现

1.2 Bucket4j 限流器支持

WebFlux 版本新增 Bucket4j 令牌桶算法支持:

spring:cloud:gateway:server:webflux:routes:-id:rate-limited-routeuri:http://backend-servicefilters:-name:Bucket4jRateLimitargs:capacity:100refill-rate:10refill-period: PT1S

2、重要弃用

2.1. WebClientRouting 基础设施

• 状态: 已弃用,5.0 版本将移除
• 影响: 依赖此基础设施的路由逻辑需要迁移
• 建议: 使用 Gateway 提供的标准路由机制

2.2. 模块和启动器重命名

为明确区分 Web 技术栈和工作模式,引入新的命名规范:

旧名称新名称说明
spring-cloud-gateway-serverspring-cloud-gateway-server-webfluxWebFlux 服务器模式
spring-cloud-gateway-server-mvcspring-cloud-gateway-server-webmvcWebMVC 服务器模式
spring-cloud-starter-gateway-serverspring-cloud-starter-gateway-server-webfluxWebFlux 启动器
spring-cloud-starter-gateway-server-mvcspring-cloud-starter-gateway-server-webmvcWebMVC 启动器
spring-cloud-gateway-mvcspring-cloud-gateway-proxyexchange-webmvcWebMVC 代理交换
spring-cloud-gateway-webfluxspring-cloud-gateway-proxyexchange-webfluxWebFlux 代理交换

3、破坏性变更

3.1 X-Forwarded-* 头部默认禁用

出于安全考虑,X-Forwarded-* 和 Forwarded 头部功能默认禁用。

3.2 配置受信任代理:

# WebFlux 版本
spring:
cloud:gateway:server:webflux:trusted-proxies:"192\\.168\\..*|10\\..*"# WebMVC 版本 (4.1.x+)
spring:
cloud:gateway:mvc:trusted-proxies: "192\\.168\\..*|10\\..*"

3.3 安全影响:

防止恶意伪造代理头部,需要显式配置信任边界。但如果下游业务有依赖此请求头,请及时处理。

三、Spring Cloud Config 增强

AWS S3 YAML Profile 支持

Config Server 现在支持从 S3 读取 profile 特定的 YAML 文件:

spring:cloud:config:server:awss3:bucket: my-config-bucketregion: us-west-2

文件结构示例:

s3://my-config-bucket/
├── application.yaml
├── application-dev.yaml
├── application-prod.yaml
└── application-test.yaml

Config Server 将根据激活的 profile 自动加载对应配置文件。

四、Spring Cloud Kubernetes 更新

组合配置源支持

Kubernetes ConfigMap 和 Secret 现在可作为组合配置源:

spring:cloud:kubernetes:config:sources:-name:app-confignamespace:default-name:db-secretnamespace:defaultexplicit-prefix: database

配置优先级:

  1. 命令行参数
  2. 系统属性
  3. Kubernetes ConfigMap/Secret
  4. application.yaml
  5. 默认值

五、Spring Cloud Circuitbreaker 新特性

响应式隔离支持

新增对响应式编程模式支持:

@Component
publicclassReactiveService {@Autowiredprivate ReactiveCircuitBreakerFactory circuitBreakerFactory;public Mono<String> callExternalService() {return circuitBreakerFactory.create("external-service").run(webClient.get().uri("/api/data").retrieve().bodyToMono(String.class),throwable -> Mono.just("fallback-response"));}
}

配置示例:

resilience4j:bulkhead:instances:external-service:max-concurrent-calls: 10max-wait-duration: 1000ms

六、Spring Cloud Netflix 改进

Eureka 客户端增强

支持 Apache HTTP Client 5 的 RequestConfig 定制:

@Bean
public EurekaClientHttpRequestFactorySupplier customRequestFactorySupplier() {return () -> {RequestConfigrequestConfig= RequestConfig.custom().setConnectTimeout(5000).setSocketTimeout(10000).setConnectionRequestTimeout(3000).build();returnnewHttpComponentsClientHttpRequestFactory(HttpClients.custom().setDefaultRequestConfig(requestConfig).build());};
}

七、版本更新清单

所有模块已更新至最新版本以确保与 Spring Boot 3.5.0 兼容:

模块名称版本
Spring Cloud Config4.3.0
Spring Cloud Gateway4.3.0
Spring Cloud Kubernetes3.3.0
Spring Cloud Circuitbreaker3.3.0
Spring Cloud Netflix4.3.0
Spring Cloud Build4.3.0
Spring Cloud Openfeign4.3.0
Spring Cloud Stream4.3.0
Spring Cloud Commons4.3.0
Spring Cloud Contract4.3.0
Spring Cloud Consul4.3.0
Spring Cloud Vault4.3.0
Spring Cloud Function4.3.0
Spring Cloud Bus4.3.0
Spring Cloud Zookeeper4.3.0
Spring Cloud Task3.3.0
Spring Cloud Starter Build2025.0.0

八、升级指南

1、前置条件

1.1. 升级 Spring Boot 至 3.5.0
1.2. Java 版本: 确保使用 Java 17+

2、升级步骤

2.1. 更新 BOM 版本

<dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>2025.0.0</version><type>pom</type><scope>import</scope></dependency></dependencies>
</dependencyManagement>

2.2. Gateway 模块迁移

<!-- 旧依赖 -->
<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-gateway</artifactId>
</dependency><!-- 新依赖 -->
<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-gateway-server-webflux</artifactId>
</dependency>

2.3. 配置属性迁移

# 旧配置
spring:
cloud:gateway:routes:-id:exampleuri:http://example.com# 新配置  
spring:
cloud:gateway:server:webflux:routes:-id:exampleuri: http://example.com

2.4. 安全配置更新

spring:cloud:gateway:server:webflux:trusted-proxies: "10\\..*|192\\.168\\..*"

2.5. Spring Cloud Alibaba 兼容性注意事项

如果您的项目集成了 Spring Cloud Alibaba 组件,需特别注意 Spring Cloud 2025.0.0 与 Spring Cloud Alibaba 2023.0.3 版本之间存在日志依赖冲突问题,可能导致应用启动失败。

解决方案:

  1. 可参考 PIG 微服务平台的解决方案 (https://gitee.com/log4j/pig/tree/jdk17-dev)
  2. 或通过显式排除冲突依赖并引入兼容版本
  3. 等待 Spring Cloud Alibaba 发布完全兼容的 2025.x 版本
http://www.dtcms.com/wzjs/202095.html

相关文章:

  • 我的世界官方网站铁马铠怎么做搜索点击软件
  • 网站建设哪家好nuoweb甘肃搜索引擎网络优化
  • 在哪个网站上做推广作用好搜索引擎优化简历
  • p2p网站建设方案万维网域名注册查询
  • b2c平台网站建设无代码建站
  • 唐山市建设交易中心官方网站网页设计师
  • 重庆建网站cqiezscom磁力链 ciliba
  • 南昌专业网站建设南宁网站seo
  • 动态个人网页制作html教程aso搜索排名优化
  • 中国建设信息网站昆明seo排名外包
  • 卖游戏币网站制作关于进一步优化
  • 聊城做wap网站公司出词
  • 网站现在怎么做排名大连网络营销seo
  • 网站用哪些系统做的好深圳门户网站
  • 网站的滚屏切换是怎么做的百度竞价app
  • 开发网站实时监控网络营销推广外包服务
  • asp动态网站开发第一章asp概述seo服务外包价格
  • 蓝色网站配色seo推广的网站和平台有哪些
  • 制作公司网站 黑龙江此网站三天换一次域名
  • 如何做seo网站沧州网站seo
  • 网投网站怎么做人工智能培训班
  • 电影网站如何做采集网页代码模板
  • wordpress 开源项目免费seo课程
  • 温岭网站建设公司自己的产品怎么推广
  • 关于网站开发网页上传和网站发布谷歌官方app下载
  • 有做网站吗上海百度推广优化
  • 桐庐县住房和城乡建设局网站百度seo搜索营销新视角
  • 邢台123网seo搜索如何优化
  • 北京微网站app2023年东莞疫情最新消息
  • 备案网站制作厦门seo关键词优化