|
@ -2,8 +2,6 @@ |
|
|
|
|
|
|
|
|
package com.fjordtek.bookstore.model.book; |
|
|
package com.fjordtek.bookstore.model.book; |
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.data.repository.CrudRepository; |
|
|
import org.springframework.data.repository.CrudRepository; |
|
|
import org.springframework.data.repository.query.Param; |
|
|
import org.springframework.data.repository.query.Param; |
|
|
import org.springframework.data.rest.core.annotation.RepositoryRestResource; |
|
|
import org.springframework.data.rest.core.annotation.RepositoryRestResource; |
|
@ -26,9 +24,9 @@ import org.springframework.data.rest.core.annotation.RestResource; |
|
|
public interface CategoryRepository extends CrudRepository<Category, Long> { |
|
|
public interface CategoryRepository extends CrudRepository<Category, Long> { |
|
|
|
|
|
|
|
|
@RestResource(exported = false) |
|
|
@RestResource(exported = false) |
|
|
List<Category> findByName(@Param("name") String name); |
|
|
|
|
|
|
|
|
Category findByName(@Param("name") String name); |
|
|
|
|
|
|
|
|
@RestResource(path = "category", rel = "category") |
|
|
@RestResource(path = "category", rel = "category") |
|
|
List<Category> findByNameIgnoreCaseContaining(@Param("name") String name); |
|
|
|
|
|
|
|
|
Category findByNameIgnoreCaseContaining(@Param("name") String name); |
|
|
|
|
|
|
|
|
} |
|
|
} |