Rename DefaultQuerydslBinderCustomizer to QuerydslBinderCustomizerDefaults.
See #206. Original Pull Request: #2292
This commit is contained in:
@@ -1667,7 +1667,7 @@ interface UserRepository extends CrudRepository<User, String>,
|
||||
<5> Exclude the `password` property from `Predicate` resolution.
|
||||
====
|
||||
|
||||
Additionally, you can register a `DefaultQuerydslBinderCustomizer` bean to apply default Querydsl bindings before applying specific bindings from the repository or `@QuerydslPredicate`.
|
||||
TIP: You can register a `QuerydslBinderCustomizerDefaults` bean holding default Querydsl bindings before applying specific bindings from the repository or `@QuerydslPredicate`.
|
||||
|
||||
[[core.repository-populators]]
|
||||
=== Repository Populators
|
||||
|
||||
@@ -24,4 +24,4 @@ import com.querydsl.core.types.EntityPath;
|
||||
* @author Mark Paluch
|
||||
* @since 2.5
|
||||
*/
|
||||
public interface DefaultQuerydslBinderCustomizer extends QuerydslBinderCustomizer<EntityPath<?>> {}
|
||||
public interface QuerydslBinderCustomizerDefaults extends QuerydslBinderCustomizer<EntityPath<?>> {}
|
||||
@@ -159,7 +159,7 @@ public class QuerydslBindingsFactory implements ApplicationContextAware {
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains registered {@link DefaultQuerydslBinderCustomizer} instances from the
|
||||
* Obtains registered {@link QuerydslBinderCustomizerDefaults} instances from the
|
||||
* {@link org.springframework.beans.factory.BeanFactory}.
|
||||
*
|
||||
* @return
|
||||
@@ -171,12 +171,12 @@ public class QuerydslBindingsFactory implements ApplicationContextAware {
|
||||
private QuerydslBinderCustomizer<EntityPath<?>> getDefaultQuerydslBinderCustomizer(
|
||||
AutowireCapableBeanFactory beanFactory) {
|
||||
|
||||
List<DefaultQuerydslBinderCustomizer> customizers = beanFactory
|
||||
.getBeanProvider(DefaultQuerydslBinderCustomizer.class).stream().collect(Collectors.toList());
|
||||
List<QuerydslBinderCustomizerDefaults> customizers = beanFactory
|
||||
.getBeanProvider(QuerydslBinderCustomizerDefaults.class).stream().collect(Collectors.toList());
|
||||
|
||||
return (bindings, root) -> {
|
||||
for (DefaultQuerydslBinderCustomizer defaultQuerydslBinderCustomizer : customizers) {
|
||||
defaultQuerydslBinderCustomizer.customize(bindings, root);
|
||||
for (QuerydslBinderCustomizerDefaults querydslBinderCustomizerDefaults : customizers) {
|
||||
querydslBinderCustomizerDefaults.customize(bindings, root);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ class QuerydslBindingsFactoryUnitTests {
|
||||
}
|
||||
}
|
||||
|
||||
static class DefaultCustomizer implements DefaultQuerydslBinderCustomizer {
|
||||
static class DefaultCustomizer implements QuerydslBinderCustomizerDefaults {
|
||||
|
||||
@Override
|
||||
public void customize(QuerydslBindings bindings, EntityPath<?> root) {
|
||||
|
||||
Reference in New Issue
Block a user