Working Rest api with spring mvc