2 u011844490 u011844490 于 2016.03.12 13:38 提问

annotation.AnnotationMethodHandlerAdapter?

下面这段代码,大致知道什么意思!求解释下这是用在哪里的?

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

1个回答

rui888
rui888   Ds   Rxr 2016.03.12 15:50

https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.html

https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/converter/StringHttpMessageConverter.html

public class StringHttpMessageConverter
extends AbstractHttpMessageConverter
Implementation of HttpMessageConverter that can read and write strings.
By default, this converter supports all media types (*/*), and writes with a Content-Type of text/plain. This can be overridden by setting the supportedMediaTypes property.

Since:
转换请求编码媒体

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!