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 />