We now provide a CDI extension to create LDAP repositories in a CDI container. LDAP repositories require a LdapOperations bean as underlying resource manager for LDAP access.
class LdapTemplateProducer {
@Produces
@Singleton
public LdapTemplate createLdapTemplate() {
LdapTemplate ldapTemplateMock = …
return ldapTemplateMock;
}
}
class RepositoryClient {
@Inject
PersonRepository repository;
}
Mark all packages with Spring Frameworks @NonNullApi. Add Spring's @Nullable to methods, parameters and fields that take or produce null values. Adapt using code to make sure the IDE can evaluate the null flow properly. Introduce methods that return required (non-null) values.
Reformat code with Spring Data formatter. Add JavaDoc to overrides and constructors. Add missing assertions to public entry points. Remove since tags from JavaDoc.
We now support nested repository interfaces and customization via EnableLdapRepositories.repositoryBaseClass.
@Configuration
@EnableLdapRepositories(considerNestedRepositories = true, repositoryBaseClass = CustomizedLdapRepository.class)
public class Config {
// …
}