Browse Source

Implement findByNameIgnoreCaseContaining method

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.2-alpha
Pekka Helenius 4 years ago
parent
commit
4dc7d46f57
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/model/CategoryRepository.java

+ 4
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/CategoryRepository.java View File

@ -16,7 +16,10 @@ import org.springframework.data.rest.core.annotation.RestResource;
) )
public interface CategoryRepository extends CrudRepository<Category, Long> { public interface CategoryRepository extends CrudRepository<Category, Long> {
@RestResource(path = "category", rel = "category")
@RestResource(exported = false)
public List<Category> findByName(@Param("name") String name); public List<Category> findByName(@Param("name") String name);
@RestResource(path = "category", rel = "category")
public List<Category> findByNameIgnoreCaseContaining(@Param("name") String name);
} }

Loading…
Cancel
Save