From 4dc7d46f5701322bc0dd4a3691a7c4f41d085dc8 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Tue, 29 Sep 2020 12:42:41 +0300 Subject: [PATCH] Implement findByNameIgnoreCaseContaining method Signed-off-by: Pekka Helenius --- .../com/fjordtek/bookstore/model/CategoryRepository.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/CategoryRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/CategoryRepository.java index 65cb322..21037bc 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/CategoryRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/CategoryRepository.java @@ -16,7 +16,10 @@ import org.springframework.data.rest.core.annotation.RestResource; ) public interface CategoryRepository extends CrudRepository { - @RestResource(path = "category", rel = "category") + @RestResource(exported = false) public List findByName(@Param("name") String name); + @RestResource(path = "category", rel = "category") + public List findByNameIgnoreCaseContaining(@Param("name") String name); + } \ No newline at end of file