Following guide for rest service from http://spring.io/guides/gs/rest-service/