Polish "Add auto-configuration support for Hazelcast client"
Closes gh-7469
This commit is contained in:
@@ -5111,9 +5111,8 @@ provide good examples of how to write XA wrappers.
|
||||
[[boot-features-hazelcast]]
|
||||
== Hazelcast
|
||||
|
||||
If hazelcast is on the classpath, Spring Boot will auto-configure an `HazelcastInstance`
|
||||
that you can inject in your application. The `HazelcastInstance` is only created if a
|
||||
configuration is found.
|
||||
If hazelcast is on the classpath and a suitable configuration is found, Spring Boot
|
||||
will auto-configure an `HazelcastInstance` that you can inject in your application.
|
||||
|
||||
You can define a `com.hazelcast.config.Config` bean and we'll use that. If your
|
||||
configuration defines an instance name, we'll try to locate an existing instance rather
|
||||
@@ -5132,6 +5131,14 @@ classpath. We also check if the `hazelcast.config` system property is set. Check
|
||||
http://docs.hazelcast.org/docs/latest/manual/html-single/[Hazelcast documentation] for
|
||||
more details.
|
||||
|
||||
If `hazelcast-client` is present on the classpath, Spring Boot will first attempt to
|
||||
create a client with similar rules as above, that is:
|
||||
|
||||
* The presence of a `com.hazelcast.client.config.ClientConfig` bean
|
||||
* A configuration file defined by the `spring.hazelcast.config` property
|
||||
* The presence of the `hazelcast.client.config` system property
|
||||
* A `hazelcast-client.xml` in the working directory or at the root of the classpath
|
||||
|
||||
NOTE: Spring Boot also has an
|
||||
<<boot-features-caching-provider-hazelcast,explicit caching support for Hazelcast>>. The
|
||||
`HazelcastInstance` is automatically wrapped in a `CacheManager` implementation if
|
||||
|
||||
Reference in New Issue
Block a user