Using the Spring config MVC namespace

Using the Spring config MVC namespace

Published: Monday, 21 May 2012

Namespace declaration

Spring 3.1

For Spring 3.1 use:

<beans xmlns="" xmlns:xsi=""

Message converters

As of Spring 3.1, you can specify custom object mappers for Jackson using the mvc:message-converter element.

      <bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
          <property name="objectMapper" ref="customObjectMapper"/>

In the above context, there is a bean customObjectMapper which is a subclass of