抢占先机
VMware 提供培训和认证,以加速您的进步。
了解更多Spring 社区的朋友们,大家好!
我很高兴地宣布 Spring Session Data Geode for Apache Geode 和 Spring Session Session Data GemFire for Pivotal GemFire 的首个里程碑版本发布。
这两个构件都可以使用 Maven 从 Spring 的 libs-milestone
存储库下载……
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-geode</artifactId>
<version>2.0.0.M1</version>
</dependency>
或者使用 Gradle……
compile 'org.springframework.session:spring-session-data-geode:2.0.0.M1'
要将 Spring Session 与 Pivotal GemFire 结合使用,只需将构件从 spring-session-data-geode
切换到 spring-session-data-gemfire
。
前段时间,Spring Session Core 的创建者兼项目负责人 @rob_winch 通过将先前支持的数据存储分解为单独的模块,重新组织了 Spring Session 项目。
此拆分的主要驱动因素是使受支持的 Spring Session 数据存储提供程序能够根据社区和客户的需求独立发展。
嗯,Pivotal GemFire 是从核心 Spring Session 项目中分离出来的受支持的数据存储之一。 除了 Pivotal GemFire 之外,对 Apache Geode 的支持也在开发中。
因此,今天完成了对受支持的 Spring Session 数据存储的支持,现在正式包括 Apache Geode 和 Pivotal GemFire,以及 Redis、MongoDB、JDBC 和 Hazelcast,在 2.0 版本系列中。
Spring Session Data Geode 和 Spring Session Data GemFire 都包含以下改进……
与 Spring Framework 5.0.0.RC3 兼容。
与 Spring Boot 2.0.0.M2 一起运行。
基于 Spring Data Kay RC2,其中包括 _Spring Data Geode 2.0.0.RC2 和 _Spring Data GemFire 2.0.0.RC2。
修订了 文档。
使用 Spring Data Geode/GemFire 的 新的 基于 Annotation 的配置模型大大简化了配置。 请参阅 示例。
例如,要构建一个使用 Spring Session Data Geode 管理 HttpSession
的 Spring Boot 应用程序,开发人员只需执行以下操作……
@SpringBootApplication
@ClientCacheApplication
@EnableGemFireHttpSession
class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args);
}
}
只需 Spring Data Geode 的 @ClientCacheApplication
和 Spring Session Data Geode 的 @EnableGemFireHttpSession
注释即可将您的 Spring Boot 应用程序变成一个 Geode 缓存客户端,该客户端能够通过将数据分发到 Geode 服务器集群来管理 HTTP Session 状态,从而实现快速可靠(复制)的访问,从而确保您的用户体验您的应用程序是不间断的,并且是一流的。
当与 Pivotal Cloud Foundry 的 强大功能、Pivotal Cloud Cache 图块以及 新的 Session State Caching 计划结合使用时,您就拥有了成功的秘诀!
如果您对此版本有任何反馈,我鼓励您通过 StackOverflow、GitHub Issues 或通过评论部分与我们联系。 您也可以在 Twitter 上 ping 我 @john_blum。
当然,最好的反馈来自 贡献。