@ResponseBody返回不能正确接收

Spring-MVC中@ResponseBody返回Bean到前台接收这么一串代码,还套着HTML标签:

The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().

经测试,在Spring-mvc.xml中添加如下代码即可:

<context:annotation-config />  
<mvc:annotation-driven />
posted @ 2014-08-07 09:46  savokiss  阅读(1016)  评论(0编辑  收藏  举报