2015年8月26日星期三



SpringMVC常用注解實例詳解3:@ResponseBody

http://www.cnblogs.com/sunang/p/3429895.html



另外,中文亂碼,解決方法:
http://blog.csdn.net/shuangde800/article/details/9098607

  1. <mvc:annotation-driven>   
  2.     <mvc:message-converters>     
  3.         <bean class="org.springframework.http.converter.StringHttpMessageConverter">     
  4.             <property name="supportedMediaTypes">     
  5.                 <list>     
  6.                     <value>text/plain;charset=UTF-8</value>     
  7.                     <value>text/html;charset=UTF-8</value>     
  8.                 </list>     
  9.             </property>     
  10.         </bean>      
  11.     </mvc:message-converters>     
  12. </mvc:annotation-driven> 

沒有留言: