Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-195 - Spring updates #1466

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@
** xref:spring:springaware.adoc[]
** xref:spring:add-caching.adoc[]
** xref:spring:hibernate.adoc[]
** xref:spring:session-replication.adoc[]
** xref:spring:transaction-manager.adoc[]
** xref:spring:best-practices.adoc[]
// Feast
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/spring/pages/add-caching.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Adding Caching to Spring
= Add caching to Spring

As of version 3.1, Spring Framework provides support for adding caching
into an existing Spring application. Spring 3.2 and later versions support
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/spring/pages/best-practices.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Spring Best Practices
= Spring best practices

Spring tries to create a new `Map`/`Collection` instance and fill
the new instance by iterating and converting values of the original
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/spring/pages/configuration.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Configuring Hazelcast in Spring
= Configure Hazelcast in Spring

*Code Sample*: See our https://github.com/hazelcast/hazelcast-code-samples/tree/master/spring/spring-configuration[sample application^]
for Spring Configuration.
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/spring/pages/hibernate.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Configuring Hibernate Second-Level Cache
= Configure Hibernate second level cache

**Code Sample**: See the https://github.com/hazelcast/hazelcast-code-samples/tree/master/spring/spring-hibernate-2ndlevel-cache[sample application^]
for Hibernate 2nd Level Cache configuration.
for Hibernate second level cache configuration.

If you are using Hibernate with Hazelcast as a second level cache provider, you can easily configure your
`LocalSessionFactoryBean` to use a Hazelcast instance by passing Hazelcast instance name. That way, you can use the
Expand Down
32 changes: 28 additions & 4 deletions docs/modules/spring/pages/overview.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
= Integrate with Spring

You can integrate Hazelcast with Spring and this section explains the
configuration of Hazelcast within Spring context.
https://spring.io/[Spring] is a popular framework for writing enterprise-grade Java applications. https://spring.io/projects/spring-framework[Spring Framework] includes a range of libraries to reduce the need for boilerplate code and encourages a consistent structure for ease of maintenance. https://spring.io/projects/spring-boot[Spring Boot] further simplifies development by automatically configuring applications on your classpath.

Supported Versions are Spring 4.3 and higher releases and the latest
tested Spring version is 5.3.
Hazelcast Platform is integrated with the Spring Framework and Spring Boot, allowing you to easily incorporate Hazelcast's fast data cache capabilities into your Spring applications.

== Why use Hazelcast with Spring?

You can use Hazelcast to enhance your Spring applications with caching and session replication.

**Cache** - You can use Hazelcast as a Spring cache manager or a JCache-compliant cache, as described in the https://docs.spring.io/spring-boot/reference/io/caching.html#io.caching.provider.hazelcast[Spring Boot documentation].

**Hibernate second-level cache** - You can use Hazelcast as a second-level cache in the https://hibernate.org/[Hibernate] framework.
Rob-Hazelcast marked this conversation as resolved.
Show resolved Hide resolved

**Session replication** - You can use Hazelcast to replicate session data across multiple web applications or microservices. Hazelcast provides xref:plugins:web-session-replication[plugins] for several web servers, including Spring's default web server, Tomcat.

Using Spring also makes it easier to work with Hazelcast. You can:

* Autowire Hazelcast objects, such as the distributed map (IMap), without needing to configure a Hazelcast member first. Spring Boot automatically configures a Hazelcast member if Hazelcast is on the classpath.
* Use `@SpringAware` annotation on Hazelcast objects to enable dependency injection inside classes processed by Hazelcast, such as `EntryProcessor` and `Callable`.
* Reduce the configuration needed to set up Hazelcast.

== Architecture options

You can embed Hazelcast members in the same Java process as your Spring application or deploy them separately in a client/server topology. See xref:deploy:choosing-a-deployment-option.adoc[].

== Supported Spring Framework versions

Supported: 5.3.39 and newer

Latest tested: 6.2.0
Rob-Hazelcast marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions docs/modules/spring/pages/session-replication.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
= Enable session replication

2 changes: 1 addition & 1 deletion docs/modules/spring/pages/springaware.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Enabling SpringAware Objects
= Enable SpringAware objects

You can mark Hazelcast Distributed Objects with `@SpringAware` if the object wants to apply:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/spring/pages/transaction-manager.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Configuring Hazelcast Transaction Manager
= Configure Hazelcast Transaction Manager

You can get rid of the boilerplate code to begin, commit or rollback
transactions by using https://docs.hazelcast.org/docs/{full-version}/javadoc/com/hazelcast/spring/transaction/HazelcastTransactionManager.html[HazelcastTransactionManager^]
Expand Down
Loading