Using LdapTemplate to perform CRUD operations

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 ...

Get Spring 5.0 Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.