我正在尝试将一个hashset嵌入到javax.ws.rs.core.Response的实体中
例如:
@GET
@Path("someting...")
@Produces("application/xml")
public Response getStuff( ... ...) {
Set<customisedClass> stuff = retrieveMethod(xx);
return Response.ok().entity(stuff).build()
这会给我:
Could not find MessageBodyWriter for response object of type: java.util.HashSet of media type: application/xml
有谁知道我应该怎么做? “customisedClass”已经正确注释。
由于