兼容有安全配置的RestTemplate的最低spring boot版本是多少?

问题描述 投票:0回答:0

所以我们知道在 SpringBoot 3.0.x 中 OAuth2RestTemplate 被弃用,使得很多人使用 WebClient 作为使用 Security 进行 API 调用的方式

但是,RestTemplate (import org.springframework.web.client.RestTemplate;) 库本身(请注意,WebClient 来自反应式,不同于您在该导入语句中看到的

web.client
)已更新为包含集成安全性。

集成安全性是什么意思? 许多人过去使用一个 RestTemplate 获取令牌,另一个用于进行 API 调用。 Ingrated Security 意味着一个 RestTemplate 可以同时完成这两项工作(通过安全配置)

我尝试从 2.5.14 迁移到 Spring Boot 3.0.1,但重大更改的数量引出了一个问题:我只需要升级到 2.7

spring-boot resttemplate spring-oauth2
© www.soinside.com 2019 - 2024. All rights reserved.