spring based rest api implementation