If the response is i JSON format . Then to hide sensitive info like userId, email, mobile and any other in response we can use Annotation called @JsonIgnore which will hide the info like email, mobile and userId from response