minor configuration work
This commit is contained in:
parent
72edb72fd5
commit
0f8409bf7d
|
@ -20,25 +20,24 @@ public class WebConfig extends WebMvcConfigurerAdapter {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
// API
|
//
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configureMessageConverters(final List<HttpMessageConverter<?>> messageConverters) {
|
public void configureMessageConverters(final List<HttpMessageConverter<?>> messageConverters) {
|
||||||
messageConverters.add(marshallingHttpMessageConverter());
|
messageConverters.add(createXmlHttpMessageConverter());
|
||||||
messageConverters.add(new MappingJackson2HttpMessageConverter());
|
messageConverters.add(new MappingJackson2HttpMessageConverter());
|
||||||
|
|
||||||
super.configureMessageConverters(messageConverters);
|
super.configureMessageConverters(messageConverters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// UTIL
|
private HttpMessageConverter<Object> createXmlHttpMessageConverter() {
|
||||||
|
final MarshallingHttpMessageConverter xmlConverter = new MarshallingHttpMessageConverter();
|
||||||
|
|
||||||
private final MarshallingHttpMessageConverter marshallingHttpMessageConverter() {
|
|
||||||
final MarshallingHttpMessageConverter marshallingHttpMessageConverter = new MarshallingHttpMessageConverter();
|
|
||||||
final XStreamMarshaller xstreamMarshaller = new XStreamMarshaller();
|
final XStreamMarshaller xstreamMarshaller = new XStreamMarshaller();
|
||||||
marshallingHttpMessageConverter.setMarshaller(xstreamMarshaller);
|
xmlConverter.setMarshaller(xstreamMarshaller);
|
||||||
marshallingHttpMessageConverter.setUnmarshaller(xstreamMarshaller);
|
xmlConverter.setUnmarshaller(xstreamMarshaller);
|
||||||
|
|
||||||
return marshallingHttpMessageConverter;
|
return xmlConverter;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue