Query execution without a predicate now no longer fails but falls back to LdapOperations.findAll(…). Previously, we did not initialize the filter of LdapQuery which caused an IllegalStateException in LdapOperations.find(…).
We now export composable repositories through our CDI extension. Repositories can now be customized either by a single custom implementation (as it was before) and by providing fragment interfaces along their fragment implementation.
This change aligns CDI support with the existing RepositoryFactory support we provide within a Spring application context.
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 {
// …
}