Skip to content

Instantly share code, notes, and snippets.

@Sam-Kruglov
Last active January 11, 2018 10:13
Show Gist options
  • Save Sam-Kruglov/3fec9c2b08032472f5d267a39930a974 to your computer and use it in GitHub Desktop.
Save Sam-Kruglov/3fec9c2b08032472f5d267a39930a974 to your computer and use it in GitHub Desktop.
Integrate the DTO to Spring Data
public interface UserRepository extends CrudRepository<User, Long> {
@RestResource(path = "username", rel = "getUsername")
UserUsername findUsernameById(@Param("id") Long id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment