Spring Boot Starters
Ho, ho, hooo! It looks like all members of Infinispan Community have been nice and Santa brought you Spring Boot Starters!
This will make you even more productive and your code less verbose!
Why do I need 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.
What do I need to get started?
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:
Special thanks go to Marco Yuen, who donated us with Spring Boot Starters code and Tomasz Zabłocki, who updated them to current version and Stéphane Nicoll who spent tremendous amount of time reviewing the Starters.
Get it, Use it, Ask us!We’re hard at work on new features, improvements and fixes, so watch this space for more announcements!
Please, download and test the latest release.
If you have questions, are experiencing a bug or want advice on using Infinispan, you can use StackOverflow. We will do our best to answer you as soon as we can.