此内容没有您所选择的语言版本。

Chapter 14. Integration with the Spring Framework


JBoss Data Grid allows users to define a Spring Cache provider, providing applications a method of easily adding caching support, and allowing users familiar with Spring's programming model a way to have caching fulfilled by JBoss Data Grid.

Note

JSR-107 (JCache) annotations are only supported in Spring 4.

Important

Spring 3 has been deprecated in JBoss Data Grid 6.6.0, and is expected to be removed in subsequent versions.

14.1. Defining the Spring Maven Dependency

The Spring module is bundled separately from the Library and Remote Client-Server dependencies. The following Maven configuration should be used, corresponding with the version of Spring in use.
Spring 4

Example 14.1. pom.xml for Spring 4 in Library Mode

<dependency>
    <groupId>org.infinispan</groupId>
    <artifactId>infinispan-spring4-embedded</artifactId>
    <version>${infinispan.version}</version>
</dependency>
Copy to Clipboard Toggle word wrap

Example 14.2. pom.xml for Spring 4 in Remote Client-Server Mode

<dependency>
    <groupId>org.infinispan</groupId>
    <artifactId>infinispan-spring4-remote</artifactId>
    <version>${infinispan.version}</version>
</dependency>
Copy to Clipboard Toggle word wrap
Spring 3

Example 14.3. pom.xml for Spring 3 (for both Library and Remote Client-Server Mode)

<dependency>
    <groupId>org.infinispan</groupId>
    <artifactId>infinispan-spring3</artifactId>
    <version>${infinispan.version}</version>
</dependency>
Copy to Clipboard Toggle word wrap

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat