更新时间:2023-08-17 18:05:52
尝试将控制器注释更改为以下内容:
Try to change your controller annotations to something like this:
@Controller
@RequestMapping(value="/movies", produces="application/json)
public class MovieController{
@RequestMapping(value="/", method=RequestMethod.GET)
public MyResponseObject getMovies(){
//you can return a POJO object if you are using a Jackson Mapper
return new MyResponseObject("foo", "bar");
}
}