users@jersey.java.net

[Jersey] return Response.ok.entity(user).build(); miss some field?

From: Whoami . <nothing.whoami_at_gmail.com>
Date: Thu, 14 Apr 2016 11:15:27 +0800

For ex:

Class User{
 String id:
 String un;
 String pwd;
 String roleAs;
 .
 .
 {get set}
}

@Provider
public class CustomObjectMapperProvider implements
ContextResolver<ObjectMapper> {

    private final ObjectMapper mapper;

    public CustomObjectMapperProvider() {
        mapper = new ObjectMapper();
        mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
        mapper.enable(DeserializationFeature.USE_BIG_INTEGER_FOR_INTS);
        mapper.registerModule(new JodaModule());
    }

    @Override
    public ObjectMapper getContext(Class<?> type) {
        return null;
    }
}


but When I use postMan request this interface, sometimes(very little times)
it return just {id,un}, the others is missing.

What should I do about this?

Thanks!

Have a nice day!
Nothing