나는이 있습니다 Map<String, Object> social = new HashMap<String, Object>(); social.put("socialId", socialId); social.put("savedComment", savedComment);
ResponseBuilder - Long을 Collection에 캐스트 할 수 없습니까?
을하고 나는이 할 노력하고있어 : 왜 HTTP 상태 (500)를 수신하고 builder = Response.status(Response.Status.OK).entity(social);
을 - java.lang.ClassCastException가 : java.lang.Long의이 자바 캐스트 할 수없는 .util.Collection, Object는 Long 및 일반 Object 클래스에서 작동해야하기 때문에? 두 가지 유형의 데이터를 보낼 수 없으므로 데이터에 data.socialId (Long으로) 및 data.savedComment (객체로)가 포함되어 있습니까?
* socialId는 Long 객체이고 savedComment는 SocialComment 객체입니다.
어떻게 GenericEntity으로 포장 수 있을까? –