0
您好我正在尝试使用REST Json编写小应用程序。我有一些方法返回实体对象的ArrayList。而我做的是:JSON + Spring 3.1
@RequestMapping(value="/workers/", method = RequestMethod.GET)
public @ResponseBody ArrayList<Workers> showAllEmployes() throws Exception
{
ArrayList<Workers> workers = new ArrayList<Workers>();
workers = (ArrayList<Workers>) spiroService.getAllWorkers();
return workers;
}
并在此之后我:
HTTP Status 500. The server encountered an internal error that prevented it from fulfilling this request.
当我尝试返回原始数据类型则一切正常。我在服务器日志中什么都没有。我有必要的进口。请点小费。
您是否在服务器日志/控制台中获得带有更详细错误消息的Stacktrace? – micha
请发布Workers类以及! –
你的依赖/ classpath上有杰克逊jar吗? –