Now, we have initialized the LdapTemplate object. Next, we will use it to perform various CRUD operations. We will use LdapTemplate in the Spring Data repository structure. For this, we need to extend the Spring Data repository model and provide a custom implementation.
Create an interface: LdapAuthRepositoryCustom. This is a place where we can define customized methods that are not directly available with the repository abstraction. Update the definition of the LdapAuthRepository interface, as follows:
@Repositorypublic interface LdapAuthRepository extends LdapRepository<LdapAuthUser>,LdapAuthRepositoryCustom{}
This is a glue point of the custom implementation with the Spring Data repository ...