Retorno do controlador Spring MVC HTML
Estou tendo um problema ao tentar retornar o HTML ao meu controlador Spring MVC.
Se parece com isso:
@RequestMapping(value = QUESTION_GROUP_CREATE_URL, method = RequestMethod.POST)
public
@ResponseBody
String createQuestionGroup(@RequestBody JsonQuestionGroup questionGroup, HttpServletResponse response) {
// questionGroup - this comes OK.
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
return "<div></div>";
}
Minha configuração de Spring:
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="favorPathExtension" value="false"/>
<property name="favorParameter" value="true"/>
<property name="mediaTypes">
<value>
json=application/json
xml=application/xml
html=application/html
</value>
</property>
</bean>
Estou vendo o firebug que a resposta está chegando como:{"String":"<div></div>"}
Como posso dizer este método para me enviar HTML simples como a resposta?