Skip to content

Commit

Permalink
Merge branch 'gh-499-rest-chunking' into gh-140-proxy-store
Browse files Browse the repository at this point in the history
  • Loading branch information
p013570 committed Jan 13, 2017
2 parents ea4298f + e9f4e4f commit c55bbb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected void setupBeanConfig() {
beanConfig.setBasePath(baseUrl);
beanConfig.setVersion(System.getProperty(SystemProperty.VERSION, SystemProperty.CORE_VERSION));
beanConfig.setResourcePackage(System.getProperty(SystemProperty.SERVICES_PACKAGE_PREFIX, SystemProperty.SERVICES_PACKAGE_PREFIX_DEFAULT));
beanConfig.setScan(false);
beanConfig.setScan(true);
}

protected void addServices() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
package uk.gov.gchq.gaffer.rest.serialisation;

import com.fasterxml.jackson.databind.ObjectMapper;
import uk.gov.gchq.gaffer.jsonserialisation.JSONSerialiser;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;

import static uk.gov.gchq.gaffer.jsonserialisation.JSONSerialiser.createDefaultMapper;

/**
* A {@link javax.ws.rs.ext.ContextResolver} implementation to provide a default
* {@link com.fasterxml.jackson.databind.ObjectMapper} for converting objects to
Expand All @@ -32,11 +31,15 @@ public class RestJsonProvider implements ContextResolver<ObjectMapper> {
public final ObjectMapper mapper;

public RestJsonProvider() {
this.mapper = createDefaultMapper();
this.mapper = createMapper();
}

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

protected ObjectMapper createMapper() {
return JSONSerialiser.createDefaultMapper();
}
}

0 comments on commit c55bbb7

Please sign in to comment.