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