From cf9f9ab000faa0ee048e5f46a5f7598b19f23e38 Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Thu, 17 Apr 2025 11:11:42 -0600 Subject: [PATCH] Polish Converter Documentation Added details about Spring Boot support. Issue gh-633 --- modules/ROOT/pages/odm.adoc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/ROOT/pages/odm.adoc b/modules/ROOT/pages/odm.adoc index 6131e887..4170ab94 100644 --- a/modules/ROOT/pages/odm.adoc +++ b/modules/ROOT/pages/odm.adoc @@ -19,7 +19,15 @@ The Spring LDAP project offers a similar ability with respect to LDAP directorie `LdapTemplate` constructs a default `ObjectDirectoryMapper` which typically renders additional configuration unnecessary. -However, you can also make `ObjectDirectoryMapper` available as a `@Bean` by importing `ObjectDirectoryMapperConfiguration` like so: +=== Converters with Boot + +`ObjectDirectoryMapper` supports `ConversionService` which allows you to specify customer ``Converter``s for mapping between Java and LDAP. + +When you are using Spring Boot, you can simply publish a `Converter` as you would normally and the `ObjectDirectoryMapper` bean that Boot provides will pick them up. + +=== Converters without Boot + +You can also make `ObjectDirectoryMapper` available as a `@Bean` by importing `ObjectDirectoryMapperConfiguration` like so: [source,java] ---- @@ -42,9 +50,7 @@ LdapTemplate ldapTemplate(ContextSource contextSource, ObjectDirectoryMapper odm } ---- -Using this import provides the benefit that it will automatically configure `ObjectDirectoryMapper` with the `ConversionService` in the `ApplicationContext`. - -This means that Spring LDAP will use your configured `Converter` instances. +Doing so will make so that Spring LDAP will use your configured `Converter` instances. [[annotations]] == Annotations