先行一步
VMware 提供培训和认证,助力您加速发展。
了解更多我代表 Spring、Apache Geode 和 VMware Tanzu GemFire 社区,很高兴宣布发布 Spring Boot for Apache Geode & VMware GemFire (SBDG) 的 1.4.0-M2
和 1.3.3.RELEASE
版本。
SBDG 1.4.0-M2
基于
Spring Boot 2.4.0-M2
Spring Framework 5.3.0-M2
适用于 Apache Geode 和 VMware GemFire 的 Spring Data (SDG) 2020.0.0-M2
(Ockham-M2/2.4.0-M2)
适用于 Apache Geode 和 VMware GemFire 的 Spring Session (SSDG) 2020.0.0-M1
(2.4.0-M1)
适用于 Apache Geode 和 VMware GemFire 的 Spring Test (STDG) 0.0.18.RELEASE
SBDG 1.3.3.RELEASE
基于
Spring Boot 2.3.3.RELEASE
Spring Framework 5.2.8.RELEASE
适用于 Apache Geode 和 VMware GemFire 的 Spring Data (SDG) Neumann-SR3
(2.3.3.RELEASE)
适用于 Apache Geode 和 VMware GemFire 的 Spring Session (SSDG) Dragonfruit-RELEASE
(2.3.0.RELEASE)
适用于 Apache Geode 和 VMware GemFire 的 Spring Test (STDG) 0.0.18.RELEASE
您可以查看版本兼容性矩阵获取完整详细信息(向右滚动表格可查看所有依赖项)。
开始使用 Apache Geode 构建 Spring Boot 应用程序的最佳方式是使用 Spring Initializer,网址是 start.spring.io。只需点击此 链接即可开始。
SBDG 1.4 M2 添加了对异步(Write-Behind)、内联缓存的专门支持!
通过将*内联缓存*模式应用于您的 Spring Boot 应用程序,Apache Geode 将在缓存未命中时自动进行*读穿*(Read-Through),在缓存更新时自动进行*写穿*(Write-Through)(同步)或*写回*(Write-Behind)(异步),无需您在应用程序中进行任何特殊操作。
如果不需要强一致性且您希望获得更好的吞吐量,则应使用异步、*写回*内联缓存。
提示
SBDG 已经支持同步(读/写穿)内联缓存。另请参阅相关的示例指南和示例代码。
提示
SBDG 还支持旁路缓存(Look-Aside)、近端缓存(Near Caching)和多站点缓存(Multi-Site)模式。
注意
当大多数人想到缓存时,他们实际上是指*旁路缓存*模式。但是,您知道吗,缓存有几种模式:*旁路缓存*、*近端缓存*、*内联缓存*(同步和异步)和*多站点缓存*。不要混淆缓存的“模式”(如何应用)与缓存的“用例”(用于什么),例如(HTTP)会话状态缓存。是的,缓存还有许多其他“用途”,但有非常具体的模式,它们具有各自的架构优缺点,适用于某些用例而不适用于其他用例。“你知道得越多越好…”
SBDG 1.4 M2 和 1.3.3.RELEASE 都包含了新的 spring-geode-bom
模块。鉴于 SBDG 包含以下模块
spring-geode-starter
spring-geode-starter-actuator
spring-geode-starter-session
spring-geode-starter-test
通过使用新的 Maven BOM 文件,您只需在 Spring Boot Gradle 或 Maven POM 项目构建文件中声明依赖管理,即可集中且一致地管理应用程序所需的 SBDG 模块版本。
例如
<properties>
<spring-geode.version>1.4.0-M2</spring-geode.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-bom</artifactId>
<version>${spring-geode.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
我们将向 Spring Initializer 提出更改请求,使其在使用 Apache Geode 生成 Spring Boot Gradle/Maven 项目时声明新的 spring-geode-bom
Maven BOM。
本次发布版本中包含的其他值得注意的变更
更新了“*入门*”示例指南,在“在云平台环境中运行应用程序”下添加了名为“*匹配客户端/服务器版本*”的部分,以帮助用户了解 Spring Boot、Apache Geode、VMware/Pivotal GemFire 和 Pivotal Cloud Cache(现称为 VMware Tanzu GemFire for VMs - BOSH)的版本兼容性要求……呼!
包含了一个新的关于安全的示例指南和示例代码,即如何在本地和托管(例如云平台)环境中运行时使用 Spring Boot 保护您的 GemFire/Geode 客户端和服务器。
请参阅更新日志以获取完整详细信息。
我们可能会在达到 GA 版本之前,为 SBDG 1.4 版本系列再提供一份关于异步(写回)内联缓存的示例指南和代码,并加倍努力使现有功能更加健壮和可靠。
该项目的其他总体目标之一是让用户难以做错事。我们还有一段路要走,但每一步我都更加确信事情正朝着正确的方向发展。
一如既往,欢迎并感谢您的反馈和贡献。
问题 | PR | StackOverflow