Let us assume that there is a distributed setup of microservices, which can dockerized or not, just for us to apply the following steps in building Hazelcast caching:
- Open the pom.xml file of the ch12-hiber project and add the following Spring Cache starter POM dependency, as follows:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency>
- Then, add the Spring Boot 2.0 starter POM for Hazelcast support. Also, include the updated and stable version of the Hazelcast-Spring external libraries needed to configure the Hazelcast cache manager for the Spring 5 application, as follows:
<dependency> <groupId>com.hazelcast</groupId> <artifactId>hazelcast</artifactId> ...