1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <beans xmlns="http://www.springframework.org/schema/beans"
\r
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
\r
4 xmlns:context="http://www.springframework.org/schema/context"
\r
5 xmlns:util="http://www.springframework.org/schema/util"
\r
6 xmlns:p="http://www.springframework.org/schema/p"
\r
7 xsi:schemaLocation="http://www.springframework.org/schema/beans
\r
8 http://www.springframework.org/schema/beans/spring-beans.xsd
\r
9 http://www.springframework.org/schema/context
\r
10 http://www.springframework.org/schema/context/spring-context.xsd
\r
11 http://www.springframework.org/schema/util
\r
12 http://www.springframework.org/schema/util/spring-util.xsd">
\r
15 <context:annotation-config />
\r
17 <context:component-scan base-package="de.spring.webservices.rest"/>
\r
19 <context:property-placeholder location="classpath:rest.properties" />
\r
21 <bean id="jsonObjectMapperFactory" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean" p:indentOutput="true" p:failOnEmptyBeans="false">
\r
22 <property name="featuresToDisable">
\r
24 <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES"/>
\r
25 <util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.DEFAULT_VIEW_INCLUSION"/>
\r
30 <util:list id="messageConverters">
\r
31 <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" p:objectMapper-ref="jsonObjectMapperFactory"/>
\r
32 <bean class="org.springframework.http.converter.StringHttpMessageConverter" />
\r
35 <bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
\r
36 <constructor-arg ref="messageConverters" />
\r