Spring Boot Starters
Spring Boot Starters make the bootstrapping process much easier and faster. The starter brings you required Maven dependencies as well as some predefined configuration bits.
The starter can operate in two modes: client/server (when you connect to a remote Infinispan Server cluster) and embedded (packaged along with your app). The former is the default. It’s also possible to use both those modes at the same time (store some data along with your app and connect to a remote Infinispan Server cluster to perform some other type of operations).
Assuming you have an Infinispan Server running on IP address 192.168.0.17, all you need to do is to use the following dependencies:
By default, the starter will try to locate hotrod-client.properties file. The file should contain at least the server list:
It is also possible to create RemoteCacheManager's configuration manually:
That’s it! Your app should successfully connect to a remote cluster and you should be able to inject RemoteCacheManager.
Using Infinispan embedded is even simpler than that. All you need to do is to add additional dependency to the classpath:
The starter will provide you a preconfigured EmbeddedCacheManager. In order to customize the configuration, use the following code snippet: