Package org.oxerr.jackson.module.jsr250
package org.oxerr.jackson.module.jsr250
Excludes properties from serialization output.
Supports:
- DenyAll
- RolesAllowed
public class User { private String nickname; private String username; private String password; public String getNickname() { return nickname; } @RolesAllowed("ROLE_ADMIN") public String getUsername() { return username; } @DenyAll public String getPassword() { return password; } }The
username
will be excluded if currently authenticated principal
is not in ADMIN role, and the password
will be always excluded.-
ClassDescriptionExcludes the properties that are
DenyAll
or notRolesAllowed
from the serialization output.Jackson Module for JSR 250.