From 5ef9f27136103d1a6708bc93cc2ca1933c4b2852 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Mon, 12 Oct 2020 21:33:40 +0300 Subject: [PATCH] Role: return only a single Role object since role is unique Signed-off-by: Pekka Helenius --- .../com/fjordtek/bookstore/model/auth/RoleRepository.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/auth/RoleRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/auth/RoleRepository.java index 6e54928..de6e989 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/auth/RoleRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/auth/RoleRepository.java @@ -2,8 +2,6 @@ package com.fjordtek.bookstore.model.auth; -import java.util.List; - import org.springframework.data.repository.CrudRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @@ -23,6 +21,6 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; ) public interface RoleRepository extends CrudRepository { - List findByName(String string); + Role findByName(String string); } \ No newline at end of file