Had the same issue when defining my own AnnotationMethodHandlerAdapter so I could register custom messageConverters. The
Code:
<mvc:annotation-driven />
tag I had used for registering a validator and conversion service created its own AnnotationMethodHandlerAdapter, put it at order #0, and my message converters were never used.
Took me a while to track it down to the same thing; took out the
Code:
<mvc:annotation-driven />
tag and defined all my own stuff using this instead:
Code:
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="webBindingInitializer">
<bean class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer">
<property name="conversionService" ref="customConversionService"/>
<property name="validator" ref="customValidator"/>
</bean>
</property>
<property name="messageConverters">
...
</property>
</bean>
Hope that helps someone not spend an hour or two tracking it down...