在 RESTEasy 中编组和解组 String[] 或 List 有简单的方法吗?
我的代码示例:
@GET
@Path("/getSomething")
@Produces(MediaType.APPLICATION_JSON)
public List<String> getSomeData() {
return Arrays.asList("a","b","c","d");
}
上面给了我一个例外:
Could not find MessageBodyWriter for response object
of type: java.util.Arrays$ArrayList of media type: application/json