SyntaxFix
Write A Post
Hire A Developer
Questions
You can use projections from Spring Data JPA (doc). In your case, create interface:
interface ProjectIdAndName{ String getId(); String getName(); }
and add following method to your repository
List<ProjectIdAndName> findAll();