![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdbsF0l%2FbtrWX45N7is%2F3K7VMnPtz6QEnG6S3chYdK%2Fimg.jpg)
개발일지/Spring
Spring-boot Querydsl 사용해보기!
JPA를 이용해 간편하게 메서드 네이밍을 사용하던 중 문제가 발생했다 A and (B or C)를 찾는 메서드를 만들어야 하는데 어렵다... 사실 그냥 쿼리를 만들면 쉽긴 하다만JPA메서드네이밍만으로 할 수 있을 것 같아서 도전해 봤다 Page findAllByProductCategories_Category_CategoryIdAndNameContainsOrProductCategories_Category_CategoryIdAndBrandContains(long categoryId1, String name, long categoryId2, String brand, Pageable pageable); ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 만들고 보니 어이가 없다 ㅋㅋㅋ 그래도 약간의 ..