Created
November 15, 2016 16:04
-
-
Save qsLI/c7149e56101e45f1df51eafe111c58b5 to your computer and use it in GitHub Desktop.
This file contains 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
<!-- JSON parser configuration--> | |
<bean id="guavaObjectMapper" class="com.fasterxml.jackson.databind.ObjectMapper"/> | |
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> | |
<property name="targetObject"><ref local="guavaObjectMapper" /></property> | |
<property name="targetMethod"><value>registerModule</value></property> | |
<property name="arguments"> | |
<list> | |
<bean id="guavaModule" class="com.fasterxml.jackson.datatype.guava.GuavaModule"/> | |
</list> | |
</property> | |
</bean> | |
<mvc:annotation-driven> | |
<mvc:message-converters register-defaults="true"> | |
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"> | |
<property name="objectMapper"> | |
<ref local="guavaObjectMapper"/> | |
</property> | |
</bean> | |
</mvc:message-converters> | |
</mvc:annotation-driven> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment