このコンテンツは選択した言語では利用できません。
Chapter 37. Integration with the Spring Framework
37.1. 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.
The following steps and examples demonstrate methods that Administrators can use to configure JBoss Data Grid nodes for Spring support. Additional information, including how to include Spring annotations inside applications, can be found in the JBoss Data Grid Developer Guide .
37.2. Enabling Spring Cache Support Declaratively (Library Mode) リンクのコピーリンクがクリップボードにコピーされました!
Spring’s cache support can be enabled through the xml file by performing the following steps:
-
Add
<cache:annotation-driven/>to the xml file. This line enables the standard spring annotations to be used by the application. -
Define a cache manager using the
<infinispan:embedded-cache-manager … />.
The following example demonstrates these changes:
Sample Declarative Configuration
37.3. Enabling Spring Cache Support Declaratively (Remote Client-Server Mode) リンクのコピーリンクがクリップボードにコピーされました!
Spring’s cache support can be enabled declaratively by performing the following steps:
-
Add
<cache:annotation-driven/>to the xml file. This line enables the standard spring annotations to be used by the application. -
Define the HotRod client properties using the
<infinispan:remote-cache-manager … />.
The following example demonstrates these changes:
Sample Declarative Configuration