How to get active user’s UserDetails
Preamble: Since Spring-Security 3.2 there is a nice annotation @AuthenticationPrincipal described at the end of this answer. This is the best way to go when you use Spring-Security >= 3.2. When you: use an older version of Spring-Security, need to load your custom User Object from the Database by some information (like the login or … Read more