All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.zhengframework.rest.ObjectMapperContextResolver Maven / Gradle / Ivy

package com.github.zhengframework.rest;

import com.fasterxml.jackson.databind.ObjectMapper;
import javax.inject.Inject;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;

@Provider
public class ObjectMapperContextResolver implements ContextResolver {

  private final ObjectMapper objectMapper;

  @Inject
  public ObjectMapperContextResolver(ObjectMapper objectMapper) {
    this.objectMapper = objectMapper;
  }

  @Override
  public ObjectMapper getContext(Class type) {
    return objectMapper;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy