解决SprngMVC中ResponseBody注解中文乱码

配置文件前面加入如下结构,版本号3.2.5

解决SprngMVC中ResponseBody注解中文乱码
    <bean 
      class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> 
      <property name="messageConverters"> 
       <list> 
        <bean 
         class="org.springframework.http.converter.ByteArrayHttpMessageConverter" /> 
        <bean 
         class="org.springframework.http.converter.StringHttpMessageConverter"> 
         <property name="supportedMediaTypes"> 
          <list> 
           <value>text/plain;charset=UTF-8</value> 
          </list> 
         </property> 
        </bean> 
        <bean 
         class="org.springframework.http.converter.ResourceHttpMessageConverter" /> 
        <bean 
         class="org.springframework.http.converter.xml.SourceHttpMessageConverter" /> 
        <bean 
         class="org.springframework.http.converter.xml.XmlAwareFormHttpMessageConverter" /> 
        <bean 
         class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter" /> 
       </list> 
      </property> 
    </bean> 
解决SprngMVC中ResponseBody注解中文乱码

解决SprngMVC中ResponseBody注解中文乱码

上一篇:External file changes sync may be slow: Project files cannot be watched (are they under network mount?)


下一篇:【Leafletjs】拖拽添加marker