Polish "Fix scope of CqlSessionBuilder bean"

See gh-19899
This commit is contained in:
Stephane Nicoll
2020-01-28 14:12:31 +01:00
parent c8105413b9
commit 0516520b7e
2 changed files with 7 additions and 5 deletions

View File

@@ -4266,6 +4266,8 @@ Generally, you provide `keyspace-name` and `contact-points` as well the local da
You can also register an arbitrary number of beans that implement `DriverConfigLoaderBuilderCustomizer` for more advanced driver customizations.
The `CqlSession` can be customized with a bean of type `CqlSessionBuilderCustomizer`.
NOTE: If you're using `CqlSessionBuilder` to create multiple `CqlSession` beans, keep in mind the builder is mutable so make sure to inject a fresh copy for each session.
The following code listing shows how to inject a Cassandra bean:
[source,java,indent=0]