We now provide and configure a converter for String to LdapName conversion so Spring Data LDAP can be used with Spring Data REST without further configuration.
Original pull request: #290.
ResourceMetadataHandlerMethodArgumentResolver.supports(…) now properly checks for ResourceMetadata. It previously checked for RepositoryInformation which is probably a left-over from a previous state of the codebase and has been unnoticed so far as the class is only used as a direct dependency of other HandlerMethodArgumentResolvers.
ExposureConfiguration exposes methods to register AggregateResourceHttpMethodsFilter and AssociationResourceHttpMethodsFilter (both applied by type or globally) to customize the supported HTTP methods by collection, item and association resources. It also provides shortcuts for common use cases like disabling PUT for item resources etc.
I edited for grammar, punctuation, spelling, usage, and corporate voice. I also added the epub-cover image (and the SVG file from which it can be generated).
We now recommend to implement RepositoryRestConfigurer directly as its declared methods are now default methods. We also introduced a static factory method to easily create a configurer to customize RepositoryRestConfiguration via a Lambda expression.
Moved test case setups that use that deprecated API to the new one.
DelegatingHandlerMapping now implements MatchableHandlerMapping by selecting the a delegate based on the already implemented algorithm and then invoking the ….match(…) method in case the selected one is a MatchableHandlerMapping in turn.
Refactored the internals a bit to be able to reuse the selection algorithm from both ….getHandler(…) and ….match(…).
The default exposure of repository methods is now controlled via RepositoryRestConfiguration.setExposeRepositoryMethodsByDefault(…). That allows us to remove the additional API from RepositoryDetectionStrategy as the mere detection is an orthogonal topic.
Also added RepositoryRestConfiguration.disableDefaultExposure() to set the RepositoryDetectionStategy to ANNOTATED and disables default method exposure in one go. That can be exposed via a Spring Boot configuration property downstream.
Moved the flag to decide whether to expose repository methods by default to the RepositoryDetectionStrategy interface, so that it can be directly accessed and the test on the particular enum value is not needed anymore and thus also not duplicated into different parts of the codebase.
Added more tests to actually verify behavior on CrudMethodsSupportedHttpMethods. DefaultExposureAwareCrudMethods uses @RequiredArgumentConstructor again.
Removed Lombok constructor and accessor generation to avoid having to deal with the changed default in Lombok 1.16.20 not generating @ConstructorProperties by default anymore.
The field value lookup in ValidationErrors previously threw a NotReadablePropertyException in case a property value was null as we incorrectly piped the null value into an Optional in turn. We now eagerly reject the property if we can't find a PersistentProperty in the metamodel to avoid this.