From b40d87375a94444db0227fbefa90fde581c7149f Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Fri, 17 Apr 2020 18:44:06 +0200 Subject: [PATCH] Make UserRepository from type PagingAndSorting --- .../java/de/hft/geotime/user/UserRepository.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/de/hft/geotime/user/UserRepository.java b/backend/src/main/java/de/hft/geotime/user/UserRepository.java index 1da5103..9b303ba 100644 --- a/backend/src/main/java/de/hft/geotime/user/UserRepository.java +++ b/backend/src/main/java/de/hft/geotime/user/UserRepository.java @@ -1,6 +1,14 @@ package de.hft.geotime.user; -import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.PagingAndSortingRepository; +import org.springframework.data.rest.core.annotation.RepositoryRestResource; + +import javax.websocket.server.PathParam; +import java.util.List; + +@RepositoryRestResource +public interface UserRepository extends PagingAndSortingRepository { + + List findByUsername(@PathParam("username") String username); -public interface UserRepository extends CrudRepository { }