Skip to content
Snippets Groups Projects
Commit 6d02ab00 authored by Justin Cleveland's avatar Justin Cleveland
Browse files

Merge remote-tracking branch 'origin/master' into TryBranching

parents 4908bba3 727c0b6c
No related branches found
No related tags found
No related merge requests found
...@@ -5,21 +5,22 @@ import com.fasterxml.jackson.core.JsonParser; ...@@ -5,21 +5,22 @@ import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.PrettyPrinter; import com.fasterxml.jackson.core.PrettyPrinter;
import com.fasterxml.jackson.core.util.DefaultIndenter; import com.fasterxml.jackson.core.util.DefaultIndenter;
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module; import com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module;
import org.nrg.framework.datacache.SerializerRegistry; import org.nrg.framework.datacache.SerializerRegistry;
import org.nrg.framework.exceptions.NrgServiceException; import org.nrg.framework.exceptions.NrgServiceException;
import org.nrg.framework.services.ContextService; import org.nrg.framework.services.ContextService;
import org.nrg.framework.services.SerializerService; import org.nrg.framework.services.SerializerService;
import org.nrg.framework.services.YamlObjectMapper;
import org.nrg.prefs.beans.PreferenceBeanMixIn; import org.nrg.prefs.beans.PreferenceBeanMixIn;
import org.nrg.xdat.preferences.InitializerSiteConfiguration; import org.nrg.xdat.preferences.InitializerSiteConfiguration;
import org.nrg.xdat.preferences.SiteConfigPreferences; import org.nrg.xdat.preferences.SiteConfigPreferences;
import org.nrg.xnat.helpers.prearchive.PrearcConfig; import org.nrg.xnat.helpers.prearchive.PrearcConfig;
import org.springframework.context.annotation.*; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.http.converter.xml.MarshallingHttpMessageConverter; import org.springframework.http.converter.xml.MarshallingHttpMessageConverter;
import org.springframework.oxm.jaxb.Jaxb2Marshaller; import org.springframework.oxm.jaxb.Jaxb2Marshaller;
...@@ -65,6 +66,11 @@ public class RootConfig { ...@@ -65,6 +66,11 @@ public class RootConfig {
}}; }};
} }
@Bean
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(final Jackson2ObjectMapperBuilder builder) {
return new MappingJackson2HttpMessageConverter(builder.build());
}
@Bean @Bean
public Jackson2ObjectMapperBuilder objectMapperBuilder() { public Jackson2ObjectMapperBuilder objectMapperBuilder() {
return new Jackson2ObjectMapperBuilder() return new Jackson2ObjectMapperBuilder()
...@@ -83,11 +89,6 @@ public class RootConfig { ...@@ -83,11 +89,6 @@ public class RootConfig {
return mixIns; return mixIns;
} }
@Bean
public YamlObjectMapper yamlObjectMapper() {
return new YamlObjectMapper();
}
@Bean @Bean
public MarshallingHttpMessageConverter marshallingMessageConverter() { public MarshallingHttpMessageConverter marshallingMessageConverter() {
return new MarshallingHttpMessageConverter( return new MarshallingHttpMessageConverter(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment