问题描述
- 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>
解决方案
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:
转换请求编码媒体
时间: 2024-09-20 00:20:38