@@ -20,6 +20,7 @@ import java.util.UUID;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
||||
@@ -32,7 +33,7 @@ import org.springframework.data.rest.core.annotation.RestResource;
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@RepositoryRestResource(collectionResourceRel = "people", path = "people")
|
||||
public interface PersonRepository extends PagingAndSortingRepository<Person, UUID> {
|
||||
public interface PersonRepository extends PagingAndSortingRepository<Person, UUID>, CrudRepository<Person, UUID> {
|
||||
|
||||
@RestResource(rel = "firstname", path = "firstname")
|
||||
Page<Person> findByFirstName(@Param("firstName") String firstName, Pageable pageable);
|
||||
|
||||
Reference in New Issue
Block a user