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