Change users and user roles repositories to paging and sorting repositories

master
esensar 2017-03-23 22:11:43 +01:00
parent 91a3961a08
commit 188d45cd9a
2 changed files with 4 additions and 4 deletions

View File

@ -5,12 +5,12 @@ package ba.steleks.repository;
*/ */
import ba.steleks.repository.model.User; import ba.steleks.repository.model.User;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param; import org.springframework.data.repository.query.Param;
import java.util.List; import java.util.List;
public interface UserRolesJpaRepository extends CrudRepository<User, Long> { public interface UserRolesJpaRepository extends PagingAndSortingRepository<User, Long> {
List<User> findByUsername(@Param("username") String username); List<User> findByUsername(@Param("username") String username);
} }

View File

@ -5,8 +5,8 @@ package ba.steleks.repository;
*/ */
import ba.steleks.repository.model.UserRole; import ba.steleks.repository.model.UserRole;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.PagingAndSortingRepository;
public interface UsersJpaRepository extends CrudRepository<UserRole, Long> { public interface UsersJpaRepository extends PagingAndSortingRepository<UserRole, Long> {
} }