Spring Data Rest: Security based projection
I am using the current version of Spring Data Rest and Spring Data JPA and have following entity: public class User { @Id @GeneratedValue private Long id; private String name; private String password; private String email; ...getter/setter methods... } I am also using Spring Security . My User Repository: @RepositoryRestResource( collectionResourceRel = "user", path = "user", excerptProjection = UserSimpleProjection.class) public interface UserRepository extends PagingAndSortingRepository<User, Long> { } For Example: User 1 is logged in User 1 requests http://localhost:8080/user/1 - all fields