Spring Boot Starters
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:
Further reading
There are two link I highly recommend you to read. The first is the Spring Boot tutorial and the second is the Github page of the Starters project.
Kudos
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.
The source code is hosted on GitHub. If you need to report a bug or request a new feature, look for a similar one on our GitHub issues tracker. If you don’t find any, create a new issue.
If you have questions, are experiencing a bug or want advice on using Infinispan, you can use GitHub discussions. We will do our best to answer you as soon as we can.
The Infinispan community uses Zulip for real-time communications. Join us using either a web-browser or a dedicated application on the Infinispan chat.