Created
March 13, 2011 01:51
-
-
Save jacobheric/867782 to your computer and use it in GitHub Desktop.
Spring MVC Jackson Configuration snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Jackson ObjectMapper that can serialize and deserialize to and from JSON. --> | |
| <bean id="jacksonObjectMapper" class="com.jacobheric.youbrew.utils.json.JsonObjectMapper" /> | |
| <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> | |
| <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> | |
| <property name="webBindingInitializer"> | |
| <bean class="com.jacobheric.youbrew.utils.json.GlobalBindingInitializer"/> | |
| </property> | |
| <property name="messageConverters"> | |
| <list> | |
| <bean id="mappingJacksonHttpMessageConverter" | |
| class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"> | |
| <property name="objectMapper" ref="jacksonObjectMapper"/> | |
| </bean> | |
| </list> | |
| </property> | |
| </bean> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment