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
Post a Comment