Spring JPA Projection findAll
And add a method to the repository: List<LoginProjection> findAllProjectedBy(); The method name can be simplified to findBy() to match the documentation example at https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#projections