A good post on enabling basic authentication on Spring REST Service

http://ryanjbaxter.com/2015/01/06/securing-rest-apis-with-spring-boot/