BAEL-3797: Remove XML config from the Http Message Converters with the Spring Framework (#8627)
This commit is contained in:
parent
577bdf4631
commit
7791282270
|
@ -14,8 +14,6 @@ import org.springframework.web.filter.ShallowEtagHeaderFilter;
|
|||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
// If we want to enable xml configurations for message-converter:
|
||||
// @ImportResource("classpath:WEB-INF/api-servlet.xml")
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
|
||||
// @Override
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
|
||||
|
||||
<!-- We have to exclude Spring Boot's WebMvcAutoConfiguration if we want the xml-configured message-converters to work properly -->
|
||||
<!-- <mvc:annotation-driven> -->
|
||||
<!-- <mvc:message-converters -->
|
||||
<!-- register-defaults="true"> -->
|
||||
|
||||
<!-- <bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter"> -->
|
||||
<!-- <property name="marshaller" ref="xstreamMarshaller" /> -->
|
||||
<!-- <property name="unmarshaller" ref="xstreamMarshaller" /> -->
|
||||
<!-- </bean> -->
|
||||
<!-- <bean -->
|
||||
<!-- class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" /> -->
|
||||
<!-- </mvc:message-converters> -->
|
||||
<!-- </mvc:annotation-driven> -->
|
||||
|
||||
<!-- <bean id="xstreamMarshaller" -->
|
||||
<!-- class="org.springframework.oxm.xstream.XStreamMarshaller"> -->
|
||||
<!-- <property name="autodetectAnnotations" value="true" /> -->
|
||||
<!-- </bean> -->
|
||||
<!-- -->
|
||||
|
||||
<!-- Also, we can JUST add a HttpMessageConverter Bean to the existing Spring Boot Autoconfiguration: -->
|
||||
<!-- <bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter"> -->
|
||||
<!-- <property name="marshaller" ref="xstreamMarshaller" /> -->
|
||||
<!-- <property name="unmarshaller" ref="xstreamMarshaller" /> -->
|
||||
<!-- </bean> -->
|
||||
<!-- <bean id="xstreamMarshaller" -->
|
||||
<!-- class="org.springframework.oxm.xstream.XStreamMarshaller"> -->
|
||||
<!-- <property name="autodetectAnnotations" value="true" /> -->
|
||||
<!-- </bean> -->
|
||||
</beans>
|
||||
|
||||
|
Loading…
Reference in New Issue