-
Notifications
You must be signed in to change notification settings - Fork 687
DATACMNS-822 - Provide customizers for default pageable and sort resolvers. #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Replaced optional dependencies with Optional and explicit null checks with calls to ifPresent. Used Lambda style instead of anonymous classes where applicable. Converted Hamcrest matchers to AssertJ Minor improvements to formatting.
* | ||
* @author Vedran Pavic | ||
*/ | ||
public interface PageableHandlerMethodArgumentResolverCustomizer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is going to be a feature for the Kay
release we could add @FunctionalInterface
here. Not sure if extending Consumer<PageableHandlerMethodArgumentResolver>
and removing customize
makes sense here.
Also I'd prefer a naming like PageableHandlerMethodArgumentResolverConfigurationAdapter
over ...*Customizer
.
@@ -54,8 +57,13 @@ | |||
private final ApplicationContext context; | |||
private final ObjectFactory<ConversionService> conversionService; | |||
|
|||
public SpringDataWebConfiguration(ApplicationContext context, | |||
@Qualifier("mvcConversionService") ObjectFactory<ConversionService> conversionService) { | |||
@Autowired private Optional<PageableHandlerMethodArgumentResolverCustomizer> pageableResolverCustomizer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we do without the field injection here?
…lvers. Introduced dedicated callback interfaces to customize the HandlerMethodArgumentResolver instances registered by SpringDataWebConfiguration. This allows bean definition registration of those customizer interfaces instead of having to extend a configuration class. Original pull request: #208.
Replaced optional dependencies with Optional and explicit null checks with calls to ifPresent. Used Lambda style instead of anonymous classes where applicable. Converted Hamcrest matchers to AssertJ. Minor improvements to formatting. Original pull request: #208.
Switched to implement WebMvcConfigurer over extending WebMvcConfigurerAdapter. Formatting, assertions, Javadoc. Original pull request: #208.
This is a proposed solution for DATACMNS-822. Also, see spring-projects/spring-boot#7775.
This replaces #192. Rebased it on the new master and changed Hamcrest to AssertJ