Skip to content

Instantly share code, notes, and snippets.

Jihun Lee jihlee

  • Mesh Korea
  • Seoul, Korea
Block or report user

Report or block jihlee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@odrotbohm
odrotbohm / StoreRepository.java
Last active Jun 25, 2019
Dynamic, Querydsl-based filter bindings using Spring Data REST
View StoreRepository.java
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));
}
You can’t perform that action at this time.