I am using mvc:annotation-driven which meant that simply puttin the jackson jar files onto the classpath configured the Jackson json marhsaller. Now I would like to provide a custom object mapper to be able to control the serialization of Date fields on a global level.
I began to define the AnnotationMethodhandlerAdapter and referenced my own jsonConverter bean (see below)
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="jsonConverter" />
<ref bean="xmlMarshallingConverter" />
</list>
</property>
</bean>
The problem is dates are still written as timestamps. The custom objectmapper bean is created (got logs for that), but it seesm the objectmapper is never used. I assume it still uses the default MappingJacksonHttpMessageConverter and the default ObjectMapper.
Any ideas? How would I figure out what exact beans to overwrite to chagne the default mapper?
Thanx!
@ResponseBody? - skaffman