Spring 3.0 making JSON response using jackson message converter

后端 未结 8 2003
迷失自我
迷失自我 2020-12-01 05:20

i configure my messageconverter as Jackson\'s then

class Foo{int x; int y}

and in controller

@ResponseBody
public Foo metho         


        
8条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 06:22

    I guess that 404 is not related to your HttpMessageConverter. I had same 404-issue and the reason was that I forgot that only requests matching are sent to DispatcherServlet (I changed request mapping from *.do to *.json). Maybe this is your case also.

提交回复
热议问题