GWT의 Remote Service를 직접 테스트하는 동안 자주 발생하지 않는 오류
The method onFailure(Throwable) of type new AsyncCallback
잘못된 코드:
image.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
MyFirstService.Util.getInstance().sayHelloTo("shansun123",
new AsyncCallback<String>()
{
@Override
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
}
@Override
public void onSuccess(String result) {
Window.alert("Return from MyRemoteService: " + result);
}
});
}
});
이 오류가 발생한 것은 Googlipse를 사용할 때 IDE가 자동으로 위의 코드를 생성하고 두 가지 방법 전에 @override 메타데이터를 추가했기 때문입니다.이 두 개의 메타데이터를 없애면 된다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
vscode 폰트 변경하기(feat. Fira Code)원래 vscode 폰트도 좋지만 좀 더 깔끔한 폰트 없을까? 하고 찾다가 Fira Code라는 폰트를 발견(velog도 코드 블록에서 이 폰트를 쓰는 것 같다)했다. 링크는 위 링크에서 압축 파일을 다운받아준다. 압...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.