<bean
        class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
        <property name="messageConverters">
            <list>
                <ref bean="mappingJackson2HttpMessageConverter" />
            </list>
        </property>
    </bean>
    
    <bean id="mappingJackson2HttpMessageConverter"
        class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
        <property name="supportedMediaTypes">
            <list>
                <value>application/json;charset=UTF-8</value>
                <value>text/html;charset=UTF-8</value>
                <value>text/json;charset=UTF-8</value>
            </list>
        </property>
    </bean>

 

相关文章:

  • 2022-12-23
  • 2021-05-16
  • 2021-11-27
  • 2021-07-22
  • 2021-11-29
  • 2021-11-24
  • 2022-12-23
猜你喜欢
  • 2021-07-06
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-02-26
相关资源
相似解决方案