Spring Security: Securing Spring Data methods
Spring Data repositories allow you to easily query your entities with method names such as findByUserName(String name).
However, it can get cumbersome to always retrieve, pass and match on the active user.
Luckily Spring Security integrates well with Spring Data to minimize the overhead.
This post is part of a series of blog posts on Spring Security; the code can be found on GitHub.