java - Hiding sensitive information in response -




i working in project have user model , using rest api fetch list of users. (i have more entities).

user has password field. not want include password field in result. excluded in dto. when want create user, want include password in request. spring mvc gets user entity (not dto).

i don't think so.... example have event model connected user many-to-many relationship. don't want in request. want user. suggest me do? have kind-of dto?

thanks in advance.

use @jsonignore access.write_only getter method only

example

@jsonproperty(access = access.write_only) private string password; 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -