Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

schauder
Copy link
Contributor

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

schauder and others added 3 commits April 10, 2017 11:23
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 {
Copy link
Member

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;
Copy link
Member

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?

odrotbohm pushed a commit that referenced this pull request May 12, 2017
…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.
odrotbohm pushed a commit that referenced this pull request May 12, 2017
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.
odrotbohm added a commit that referenced this pull request May 12, 2017
Switched to implement WebMvcConfigurer over extending WebMvcConfigurerAdapter. Formatting, assertions, Javadoc.

Original pull request: #208.
@odrotbohm odrotbohm closed this May 12, 2017
@odrotbohm odrotbohm deleted the issue/DATACMNS-822 branch May 12, 2017 14:58
Aloren pushed a commit to Aloren/spring-data-commons that referenced this pull request Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants