how to build a REST api service with spring 4