This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface StoreRepository extends PagingAndSortingRepository<Store, String>, | |
QueryDslPredicateExecutor<Store>, QuerydslBinderCustomizer<QStore> { | |
@RestResource(rel = "by-location") | |
Page<Store> findByAddressLocationNear(Point location, Distance distance, Pageable pageable); | |
default void customize(QuerydslBindings bindings, QStore store) { | |
bindings.bind(store.address.city).single((path, value) -> path.startsWith(value)); | |
bindings.bind(String.class).single((StringPath path, String value) -> path.contains(value)); | |
} |