Browse Source

Role: return only a single Role object since role is unique

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.4-alpha
Pekka Helenius 4 years ago
parent
commit
5ef9f27136
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      bookstore/src/main/java/com/fjordtek/bookstore/model/auth/RoleRepository.java

+ 1
- 3
bookstore/src/main/java/com/fjordtek/bookstore/model/auth/RoleRepository.java View File

@ -2,8 +2,6 @@
package com.fjordtek.bookstore.model.auth; package com.fjordtek.bookstore.model.auth;
import java.util.List;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource; 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<Role, Long> { public interface RoleRepository extends CrudRepository<Role, Long> {
List<Role> findByName(String string);
Role findByName(String string);
} }

Loading…
Cancel
Save