-
Notifications
You must be signed in to change notification settings - Fork 678
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
DATACMNS-1785 - Add QuerydslWebFluxConfiguration and QuerydslPredicateArgumentResolver #2274
Conversation
@matiasah Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@matiasah Thank you for signing the Contributor License Agreement! |
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.
Thanks for your contribution. Please make sure to use tab indentation (see our formatting settings at https://github.com/spring-projects/spring-data-build/blob/master/etc/ide/eclipse-formatting.xml) and consider comments from #2200.
I applied the formatting settings on Visual Studio Code RedHat Java Plugin with the eclipse formatting (the link you commented on raw form), and auto-indented the files I modified. Is it good enough or should I install Eclipse to do that? |
Using a plugin that follows Eclipse formatting is perfectly fine, no need to use Eclipse. From a quick look, the code style looks fine now. |
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.
Thanks a lot. The changes look pretty good. I left few comments addressing very minor issues. Care to have a look and squash your commits once done? Feel free to force-push and leave a comment once we should have another look.
* Querydsl-specific web configuration for Spring Data. Registers a {@link HandlerMethodArgumentResolver} that builds up | ||
* {@link Predicate}s from web requests. | ||
* | ||
* @author Oliver Gierke |
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.
Nit: That's a new class. No need to copy over the original authors, having just you as @author
is sufficient.
|
||
/** | ||
* Default {@link ReactiveQuerydslPredicateArgumentResolver} to create Querydsl {@link Predicate} instances for | ||
* Spring MVC controller methods. |
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.
Nit: Spring WebFlux (instead MVC).
public ReactiveQuerydslPredicateArgumentResolver(QuerydslBindingsFactory factory, | ||
Optional<ConversionService> conversionService) { | ||
super(factory, conversionService); | ||
// TODO Auto-generated constructor stub |
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.
Nit: There are a few TODO
comments that should be removed.
* {@link HandlerMethodArgumentResolver} to allow injection of {@link com.querydsl.core.types.Predicate} into Spring | ||
* WebFlux controller methods. | ||
* | ||
* @author Christoph Strobl |
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.
Nit: You're the original author, so no need to copy over the original authors.
I'm not sure if I squashed the commits correctly. |
commit cea8d79 Merge: 1e5a890 1a25c12 Author: Ubuntu <Ubuntu> Date: Tue Jan 19 22:21:51 2021 +0000 Merge branch 'webflux-1' of https://github.com/matiasah/spring-data-commons into webflux-1 commit 1e5a890 Author: Ubuntu <Ubuntu> Date: Tue Jan 19 22:21:44 2021 +0000 Squashed commit of the following: commit 1a25c12 Author: Ubuntu <Ubuntu> Date: Tue Jan 19 22:04:18 2021 +0000 Correcting some comments commit e4c0c01 Author: Ubuntu <Ubuntu> Date: Tue Jan 19 00:08:23 2021 +0000 Add ReactiveQuerydslPredicateArgumentResolver and ReactiveQuerydslWebConfiguration commit eacf835 Author: Ubuntu <Ubuntu> Date: Sat Jan 16 00:01:23 2021 +0000 Revert code format commit 1069af3 Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:53:08 2021 +0000 Adding missing @author annotation commit c778258 Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:44:29 2021 +0000 Add package-info to WebFlux folders commit 45711bb Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:41:48 2021 +0000 Add QuerydslWebFluxConfiguration commit 5c343b5 Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:40:47 2021 +0000 Add QuerydslPredicateArgumentResolver for WebFlux commit 1a25c12 Author: Ubuntu <Ubuntu> Date: Tue Jan 19 22:04:18 2021 +0000 Correcting some comments commit e4c0c01 Author: Ubuntu <Ubuntu> Date: Tue Jan 19 00:08:23 2021 +0000 Add ReactiveQuerydslPredicateArgumentResolver and ReactiveQuerydslWebConfiguration commit eacf835 Author: Ubuntu <Ubuntu> Date: Sat Jan 16 00:01:23 2021 +0000 Revert code format commit 1069af3 Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:53:08 2021 +0000 Adding missing @author annotation commit c778258 Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:44:29 2021 +0000 Add package-info to WebFlux folders commit 45711bb Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:41:48 2021 +0000 Add QuerydslWebFluxConfiguration commit 5c343b5 Author: Ubuntu <Ubuntu> Date: Fri Jan 15 23:40:47 2021 +0000 Add QuerydslPredicateArgumentResolver for WebFlux
Introduce constructors accepting non-null ConversionService, handle conversion service defaulting in configuration classes by using ObjectProvider. Extract common code to create a predicate in getPredicate(…) method. Add unit test. Convert spaces to tabs. Related ticket: #2200. Original pull request: #2274.
Thank you for your contribution. That's merged and polished now. On a related note: Make sure to configure your local Git client with a proper name and mail address as the author of your commits is |
This pull request partially solves #2200 Adds
QuerydslWebFluxConfiguration
andQuerydslPredicateArgumentResolver
for WebFlux.It's necessary to solve #1846 to completely close #2200.