<!--启用 mvc 的常用注解-->
<mvc:annotation-driven validator="myValidator" conversion-service="conversionService">
<mvc:message-converters>
<!--@ResponseBody 的 UTF-8 编码-->
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<constructor-arg value="UTF-8"/>
</bean>
<!-- Fail On Empty Beans... -->
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="objectMapper">
<bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
<property name="failOnEmptyBeans" value="false"/>
</bean>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>