https://grokonez.com/spring-framework/spring-data/springboot-hazelcast-cache-postgresql-backend

SpringBoot Hazelcast cache with PostgreSQL backend

Performance is a big problem in software development. And Caching is one solution to speed up system. Hazelcast is an open source in-memory data grid. So in the tutorial, JavaSampleApproach will show you how to use SpringBoot Hazelcast cache with PostGreSQL backend.

Related posts:

I. Technologies

– Java 1.8 – Maven 3.3.9 – Spring Tool Suite – Version 3.8.1.RELEASE – Spring Boot: 1.5.7.RELEASE - Hazelcast

II. SpringBoot Hazelcast

In the tutorial, we will create a SpringBoot project as below design: Springboot Hazelcast Cache - Architecture

Spring Boot will auto-configure a HazelcastInstance when having Hazelcast on the classpath. And Spring Boot only configures HazelcastInstance if a Hazelcast configuration is found.

We use dependency hazelcast-spring:


<dependency>
	<groupId>com.hazelcast</groupId>
	<artifactId>hazelcast-spring</artifactId>
</dependency>
</pre>

<code>hazelcast-spring</code> had included below dependency:

<pre class="lang:xhtml">
<dependency>
	<groupId>com.hazelcast</groupId>
	<artifactId>hazelcast</artifactId>
</dependency>

We can configure Hazelcast via com.hazelcast.config.Config bean. Or use an hazelcast.xml configuration file.
In the application.properties, we specify hazelcast.xml configuration via:

More at:

https://grokonez.com/spring-framework/spring-data/springboot-hazelcast-cache-postgresql-backend

SpringBoot Hazelcast cache with PostgreSQL backend

#springboot #hazelcast #postgresql

SpringBoot Hazelcast cache with PostgreSQL backend » grokonez
1.70 GEEK