Polish "Detect DirContextAuthenticationStrategy bean"

See gh-19328
This commit is contained in:
Stephane Nicoll
2019-12-09 15:58:44 +01:00
parent c108d2d011
commit aa821151bb
3 changed files with 9 additions and 34 deletions

View File

@@ -4445,6 +4445,7 @@ To connect to an LDAP server, make sure you declare a dependency on the `spring-
If you need to customize connection settings, you can use the `spring.ldap.base` and `spring.ldap.base-environment` properties.
An `LdapContextSource` is auto-configured based on these settings.
If a `DirContextAuthenticationStrategy` bean is available, it is associated to the auto-configured `LdapContextSource`.
If you need to customize it, for instance to use a `PooledContextSource`, you can still inject the auto-configured `LdapContextSource`.
Make sure to flag your customized `ContextSource` as `@Primary` so that the auto-configured `LdapTemplate` uses it.