Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to use you Customizing ObjectMapper in a JAX-RS application example #3

Open
gclouds opened this issue Aug 31, 2018 · 1 comment

Comments

@gclouds
Copy link

gclouds commented Aug 31, 2018

No description provided.

@gclouds
Copy link
Author

gclouds commented Aug 31, 2018

this below does not works for me
`@Provider
public class ObjectMapperContextResolver implements ContextResolver {

private final ObjectMapper mapper;

public ObjectMapperContextResolver() {
    this.mapper = createObjectMapper();
}

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

private ObjectMapper createObjectMapper() {
    ObjectMapper mapper = new ObjectMapper();
    mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    return mapper;
}

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant