@At("/notes") @Service
public class NotebookService {
private Note note =new Note();
public NotebookService(){
ObjectifyService.register(Note.class);
}
public Note getNote() {
return note;
}
public void setNote(Note note) {
this.note = note;
}
@Post
public String postNote(){
note.setDate(new Date());
Objectify objectify=ObjectifyService.ofy();
objectify.save().entities(note).now();
return "/servlet";
}
}
이 java.lang.ClassCastException가를 던졌습니다 : 나는에서 URL 문자열을 반환 할 때 java.lang.String의이 com.google.sitebricks.headless.Reply 캐스트 할 수없는 @post로 주석 된 메소드. 포스트 메서드의 반환 형식이 String이면 응답을 기대하는 이유는 무엇입니까?는 ClassCastException 동안
@Service는 아직 JSON을 응답하는 코드화 된 get 메소드에 필요합니다.
그래, 나중에 Google 그룹스에서 작성자의 의견을 알게되었습니다. 감사. – SoulMan