java.lang.IllegalArgumentException: No converter found for return value of type

后端 未结 20 2135
夕颜
夕颜 2020-11-30 00:04

With this code

@RequestMapping(value = \"/bar/foo\", method = RequestMethod.GET)
    public ResponseEntity foo() {

        Foo model;
        ...         


        
20条回答
  •  情书的邮戳
    2020-11-30 00:37

    Use @ResponseBody and getter/setter. Hope it will solve your issue.

    @RequestMapping(value = "/bar/foo", method = RequestMethod.GET)
    @ResponseBody
    public ResponseEntity foo() {
    

    and update your mvc-dispatcher-servlet.xml:

    
         
                
                
       
    
    

提交回复
热议问题