This source code is used in a series of blog posts on www.javabullets.com -
https://www.javabullets.com/spring-data-rest-introduction https://www.javabullets.com/spring-security-spring-data-rest https://www.javabullets.com/securing-spring-data-rest-preauthorize