Skip to content

Instantly share code, notes, and snippets.


Jihun Lee jihlee

  • Mesh Korea
  • Seoul, Korea
View GitHub Profile
odrotbohm /
Last active Jul 2, 2020
Dynamic, Querydsl-based filter bindings using Spring Data REST
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(, value) -> path.startsWith(value));
bindings.bind(String.class).single((StringPath path, String value) -> path.contains(value));
You can’t perform that action at this time.